mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-21 18:25:41 +03:00
we never use pip in the venv manually made for tests- this might break 1-2 things unexpectedly, but - those should be looked at anyway - this has a severe speedup- even on a desktop machine with nvme, this makes an arbitrary venv go from 2.6s to <100ms(!) to make. a nice small optimisation.
40 lines
1.1 KiB
Text
40 lines
1.1 KiB
Text
# Contributor: Drew DeVault <sir@cmpwn.com>
|
|
# Maintainer: Drew DeVault <sir@cmpwn.com>
|
|
pkgname=py3-cssselect2
|
|
_pyname=cssselect2
|
|
pkgver=0.7.0
|
|
pkgrel=2
|
|
pkgdesc="CSS selectors for Python ElementTree"
|
|
url="https://pypi.org/project/cssselect2/"
|
|
arch="noarch"
|
|
license="BSD-3-Clause"
|
|
depends="py3-tinycss2"
|
|
makedepends="py3-gpep517 py3-flit-core py3-installer"
|
|
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
|
|
options="!check" # upstream tests are broken
|
|
|
|
build() {
|
|
gpep517 build-wheel \
|
|
--wheel-dir dist \
|
|
--output-fd 3 3>&1 >&2
|
|
}
|
|
|
|
check() {
|
|
python3 -m venv --clear --without-pip --system-site-packages testenv
|
|
testenv/bin/python3 -m installer dist/*.whl
|
|
testenv/bin/python3 -m pytest
|
|
}
|
|
|
|
package() {
|
|
python3 -m installer -d "$pkgdir" \
|
|
dist/*.whl
|
|
}
|
|
|
|
sha512sums="
|
|
e3c975fe159d3bec53002bda31c72d9cb346f40529272d8d5bef6aa13142ce60f1e8aa20b039d93ff5ff3d2cd34119b8b2d406f889964eded69e770e4f04e949 cssselect2-0.7.0.tar.gz
|
|
"
|