Skip to content

Instantly share code, notes, and snippets.

@avbop

avbop/PKGBUILD Secret

Created April 4, 2020 19:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save avbop/70175a669fa5708d5fb9b93be21dcd05 to your computer and use it in GitHub Desktop.
Save avbop/70175a669fa5708d5fb9b93be21dcd05 to your computer and use it in GitHub Desktop.
virtualfish for AUR
# Maintainer: Ricardo Band <email@ricardo.band>
pkgname=virtualfish
pkgver=2.1.0
pkgrel=1
pkgdesc="Fish shell tool for managing Python virtual environments"
arch=("any")
url=https://github.com/justinmayer/virtualfish
license=("MIT")
depends=("python" "python-pkgconfig" "python-psutil" "python-virtualenv" "python-xdg")
makedepends=("python-setuptools")
source=(
"https://files.pythonhosted.org/packages/source/${pkgname::1}/$pkgname/$pkgname-$pkgver.tar.gz"
"xdg.patch")
sha256sums=(
'704b9e4ec0594f84ef6a29d3caca4c74ee9778ec57ab97c5bd79073e477982c2'
'e8aa7f16bca4981395ab47152e9b8d3c8a42e039f8476f2c0c504e8c69147e75')
prepare() {
cd "$srcdir"
patch -p0 < xdg.patch
}
build() {
cd "$srcdir/$pkgname-$pkgver"
python setup.py build
}
package() {
cd "$srcdir/$pkgname-$pkgver"
python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
}
diff -ruN virtualfish-2.1.0/PKG-INFO virtualfish-2.1.0/PKG-INFO
--- virtualfish-2.1.0/PKG-INFO 2020-04-04 04:49:48.721342800 -0400
+++ virtualfish-2.1.0/PKG-INFO 2020-04-04 15:25:09.758119964 -0400
@@ -22,7 +22,7 @@
Requires-Dist: pkgconfig (>=1.5,<2.0)
Requires-Dist: psutil (>=5.7,<6.0)
Requires-Dist: virtualenv (>=20,<21)
-Requires-Dist: xdg (>=4.0,<5.0)
+Requires-Dist: pyxdg (>=0.26)
Project-URL: Documentation, https://virtualfish.readthedocs.org/
Project-URL: Repository, https://github.com/justinmayer/virtualfish
Project-URL: Tracker, https://github.com/justinmayer/virtualfish/issues
diff -ruN virtualfish-2.1.0/pyproject.toml virtualfish-2.1.0/pyproject.toml
--- virtualfish-2.1.0/pyproject.toml 2020-04-04 04:49:48.220612800 -0400
+++ virtualfish-2.1.0/pyproject.toml 2020-04-04 15:25:09.754786591 -0400
@@ -31,7 +31,7 @@
pkgconfig = "^1.5"
psutil = "^5.7"
virtualenv = "^20"
-xdg = "^4.0"
+pyxdg = "^0.26"
[tool.poetry.dev-dependencies]
black = "^19.10b0"
diff -ruN virtualfish-2.1.0/setup.py virtualfish-2.1.0/setup.py
--- virtualfish-2.1.0/setup.py 2020-04-04 04:49:48.720887200 -0400
+++ virtualfish-2.1.0/setup.py 2020-04-04 15:25:09.758119964 -0400
@@ -11,7 +11,7 @@
['pkgconfig>=1.5,<2.0',
'psutil>=5.7,<6.0',
'virtualenv>=20,<21',
- 'xdg>=4.0,<5.0']
+ 'pyxdg>=0.26']
entry_points = \
{'console_scripts': ['vf = virtualfish.loader.cli:main']}
diff -ruN virtualfish-2.1.0/virtualfish/loader/installer.py virtualfish-2.1.0/virtualfish/loader/installer.py
--- virtualfish-2.1.0/virtualfish/loader/installer.py 2020-04-04 04:47:54.392377100 -0400
+++ virtualfish-2.1.0/virtualfish/loader/installer.py 2020-04-04 15:25:09.754786591 -0400
@@ -1,10 +1,11 @@
import os
import sys
-from xdg import XDG_CONFIG_HOME
+import xdg.BaseDirectory
from virtualfish.loader import load
+XDG_CONFIG_HOME = xdg.BaseDirectory.xdg_config_home
INSTALL_DIR = os.path.join(XDG_CONFIG_HOME, "fish", "conf.d")
INSTALL_FILE = os.path.join(INSTALL_DIR, "virtualfish-loader.fish")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment