A sr.ht/py3-cssselect2/APKBUILD => sr.ht/py3-cssselect2/APKBUILD +35 -0
@@ 0,0 1,35 @@
+# Contributor: Drew DeVault <sir@cmpwn.com>
+# Maintainer: Drew DeVault <sir@cmpwn.com>
+pkgname=py3-cssselect2
+_pyname=cssselect2
+pkgver=0.2.1
+pkgrel=2
+pkgdesc="CSS selectors for Python ElementTree"
+url="https://pypi.org/projects/cssselect2/"
+arch="noarch"
+license="BSD-3-Clause"
+depends="py3-tinycss2"
+makedepends="py3-setuptools"
+checkdepends="py3-pytest py3-pytest-cov py3-pytest-isort py3-pytest-flake8"
+_pypiprefix="${_pyname%${_pyname#?}}"
+source="https://files.pythonhosted.org/packages/source/$_pypiprefix/$_pyname/$_pyname-$pkgver.tar.gz"
+builddir="$srcdir"/$_pyname-$pkgver
+
+prepare() {
+ # import sorting is broken upstream
+ sed -i setup.cfg -e 's/--isort//'
+}
+
+build() {
+ python3 setup.py build
+}
+
+check() {
+ python3 setup.py pytest
+}
+
+package() {
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+}
+
+sha512sums="88490de859175e1cba84257e8ebb6618b388f24f0e121195a013e74c783a5aef0c2aed002eb1a46512392e988b4014824f547bd3c55c645e8c30ad62dd8c1a14 cssselect2-0.2.1.tar.gz"