| 1 | # Contributor: Francesco Colista <[email protected]> |
| 2 | # Maintainer: Fabian Affolter <[email protected]> |
| 3 | pkgname=py3-cssutils |
| 4 | _pkgname=cssutils |
| 5 | pkgver=2.15.0 |
| 6 | pkgrel=0 |
| 7 | pkgdesc="CSS Cascading Style Sheets library for Python" |
| 8 | url="http://cthedot.de/cssutils/" |
| 9 | arch="noarch" |
| 10 | license="LGPL-3.0-or-later" |
| 11 | depends="py3-more-itertools py3-encutils" |
| 12 | makedepends="py3-gpep517 py3-setuptools py3-setuptools_scm py3-wheel" |
| 13 | checkdepends="py3-pytest py3-jaraco.test" |
| 14 | subpackages="$pkgname-pyc" |
| 15 | source="https://files.pythonhosted.org/packages/source/c/cssutils/cssutils-$pkgver.tar.gz" |
| 16 | builddir="$srcdir"/$_pkgname-$pkgver |
| 17 | |
| 18 | build() { |
| 19 | export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver |
| 20 | gpep517 build-wheel \ |
| 21 | --wheel-dir .dist \ |
| 22 | --output-fd 3 3>&1 >&2 |
| 23 | } |
| 24 | |
| 25 | check() { |
| 26 | python3 -m venv --clear --without-pip --system-site-packages .testenv |
| 27 | .testenv/bin/python3 -m installer .dist/*.whl |
| 28 | .testenv/bin/python3 -m pytest --ignore=tests/test_errorhandler.py tests |
| 29 | } |
| 30 | |
| 31 | package() { |
| 32 | python3 -m installer -d "$pkgdir" \ |
| 33 | .dist/cssutils*.whl |
| 34 | } |
| 35 | |
| 36 | sha512sums=" |
| 37 | babd411f3d633e35d77d36d1f905138dbd1c1d111713bf00ce4bf01b7c7990f0d82d750c4ac66af16153f3f4a7da528b0295c9f205eb5d29585c320976edf859 cssutils-2.15.0.tar.gz |
| 38 | " |