summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuis Martinez2023-01-12 14:06:04 -0600
committerLuis Martinez2023-01-12 14:09:50 -0600
commitd477d877963e508e2efc80df0cf2f92b58d8f6bd (patch)
tree56614ac5a29dade25d9c7572650f0350ce91852b
parent5d755e50e0114c193024bec98fe200eae4771088 (diff)
downloadaur-python-selection.tar.gz
update to 0.0.21
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD36
2 files changed, 28 insertions, 22 deletions
diff --git a/.SRCINFO b/.SRCINFO
index c876fb56d673..6b747910a0b6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,17 @@
pkgbase = python-selection
pkgdesc = API to extract content from HTML & XML documents
- pkgver = 0.0.14
+ pkgver = 0.0.21
pkgrel = 1
- url = https://pypi.org/project/selection
+ url = https://github.com/lorien/selection
arch = any
license = MIT
+ makedepends = python-build
+ makedepends = python-installer
makedepends = python-setuptools
+ makedepends = python-wheel
depends = python-lxml
- depends = python-six
- depends = python-weblib
- source = https://pypi.org/packages/source/s/selection/selection-0.0.14.tar.gz
- sha512sums = 8749f6c589cbc834f676432f90028161aa9eea029a6960859ae4790378e12736c153b485696b9cf00e0e9eff29afee5b63c2fa1ee69c5d563e406cf7149f29cb
+ optdepends = python-pyquery
+ source = python-selection-0.0.21.tar.gz::https://files.pythonhosted.org/packages/source/s/selection/selection-0.0.21.tar.gz
+ sha256sums = a136018db3fca4ef05ff420dd41a27789b268375aa2b17a8077faa68e671aa6d
pkgname = python-selection
diff --git a/PKGBUILD b/PKGBUILD
index 50410efee347..5f3a1397286a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,25 +1,29 @@
+# Maintainer: Luis Martinez <luis dot martinez at disroot dot org>
# Contributor: Sergey Mastykov <smastykov[at]gmail[dot]com>
-_base=selection
-pkgname=python-${_base}
+
+pkgname=python-selection
+_pkg="${pkgname#python-}"
pkgdesc="API to extract content from HTML & XML documents"
-pkgver=0.0.14
+pkgver=0.0.21
pkgrel=1
-arch=(any)
-url="https://pypi.org/project/${_base}"
-license=(MIT)
-depends=(python-lxml python-six python-weblib)
-makedepends=(python-setuptools)
-source=(https://pypi.org/packages/source/${_base::1}/${_base}/${_base}-${pkgver}.tar.gz)
-sha512sums=('8749f6c589cbc834f676432f90028161aa9eea029a6960859ae4790378e12736c153b485696b9cf00e0e9eff29afee5b63c2fa1ee69c5d563e406cf7149f29cb')
+arch=('any')
+url='https://github.com/lorien/selection'
+license=('MIT')
+depends=('python-lxml')
+optdepends=('python-pyquery')
+makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
+source=("$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/s/$_pkg/$_pkg-$pkgver.tar.gz")
+sha256sums=('a136018db3fca4ef05ff420dd41a27789b268375aa2b17a8077faa68e671aa6d')
build() {
- cd ${_base}-${pkgver}
- export PYTHONHASHSEED=0
- python setup.py build
+ cd "$_pkg-$pkgver"
+ python -m build --wheel --no-isolation
}
package() {
- cd ${_base}-${pkgver}
- PYTHONPYCACHEPREFIX="${PWD}/.cache/cpython/" python setup.py install --prefix=/usr --root="${pkgdir}" --optimize=1 --skip-build
- install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ cd "$_pkg-$pkgver"
+ python -m installer --destdir="$pkgdir" dist/*.whl
+ local _site="$(python -c 'import site; print(site.getsitepackages()[0])')"
+ install -dv "$pkgdir/usr/share/licenses/$pkgname/"
+ ln -sv "$_site/$_pkg-$pkgver.dist-info/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
}