Date: Wednesday, January 6, 2021 @ 14:40:25 Author: felixonmars Revision: 810857
addpkg: python-jaraco.test 4.0.1-1 Added: python-jaraco.test/ python-jaraco.test/repos/ python-jaraco.test/trunk/ python-jaraco.test/trunk/PKGBUILD ----------+ PKGBUILD | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) Added: python-jaraco.test/trunk/PKGBUILD =================================================================== --- python-jaraco.test/trunk/PKGBUILD (rev 0) +++ python-jaraco.test/trunk/PKGBUILD 2021-01-06 14:40:25 UTC (rev 810857) @@ -0,0 +1,44 @@ +# Maintainer: Felix Yan <[email protected]> + +pkgname=python-jaraco.test +pkgver=4.0.1 +pkgrel=1 +pkgdesc="Testing support by jaraco" +url="https://github.com/jaraco/jaraco.test" +license=('MIT') +arch=('any') +depends=('python-jaraco' 'python-jaraco.context' 'python-toml' 'python-more-itertools') +makedepends=('python-setuptools-scm') +checkdepends=('python-pytest-black' 'python-pytest-checkdocs' 'python-pytest-cov' + 'python-pytest-flake8' 'python-pytest-mypy') +source=("https://github.com/jaraco/jaraco.test/archive/v$pkgver/$pkgname-$pkgver.tar.gz") +sha512sums=('56538088f01c0c0e8ee89dd76e2cc37c48893e7319c747ee69e3f89aca41bcd00260d61cdd50601786e932c016b92e0c8f656b4eb4c4e3afae3b18173251051c') + +export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + +prepare() { + cd jaraco.test-$pkgver + # The jaraco.test.pytest module is not discovered if no __init__.py is present + touch jaraco/test/pytest/__init__.py +} + +build() { + cd jaraco.test-$pkgver + python setup.py build +} + +check() { + cd jaraco.test-$pkgver + python -m pytest +} + +package() { + cd jaraco.test-$pkgver + python setup.py install --root="$pkgdir" --optimize=1 + + rm "$pkgdir"/usr/lib/python3.9/site-packages/jaraco/__init__.py \ + "$pkgdir"/usr/lib/python3.9/site-packages/jaraco/__pycache__/__init__.cpython-39.pyc \ + "$pkgdir"/usr/lib/python3.9/site-packages/jaraco/__pycache__/__init__.cpython-39.opt-1.pyc + + install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ +}
