author | Daniel M. Capella
<polyzen@archlinux.org> 2021-08-31 00:49:06 UTC |
committer | Daniel M. Capella
<polyzen@archlinux.org> 2021-08-31 00:49:06 UTC |
parent | f07c92992d33034e09048bd3a4885c2ae7cc7052 |
PKGBUILD | +24 | -15 |
diff --git a/PKGBUILD b/PKGBUILD index 8b69278..baf565b 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -1,28 +1,35 @@ # Maintainer: Felix Yan <felixonmars@archlinux.org> +# Maintainer: Daniel M. Capella <polyzen@archlinux.org> # Contributor: Felix Kaiser <felix.kaiser@fxkr.net> pkgname=python-pytest -pkgver=6.2.4 +pkgver=6.2.5 pkgrel=1 pkgdesc="Simple powerful testing with Python" arch=('any') license=('MIT') url="https://pytest.org/" -depends=('python-attrs' 'python-iniconfig' 'python-more-itertools' 'python-packaging' 'python-pluggy' +depends=('python-attrs' 'python-iniconfig' 'python-packaging' 'python-pluggy' 'python-py' 'python-toml') -makedepends=('python-setuptools-scm') -checkdepends=('python-argcomplete' 'python-hypothesis' 'python-mock' 'python-nose' 'python-requests' - 'python-xmlschema' +makedepends=('python-setuptools') +checkdepends=('python-argcomplete' 'python-hypothesis' 'python-mock' + 'python-nose' 'python-requests' 'python-xmlschema' # Unlisted, but actually used. Check again after a while: - 'python-decorator' 'python-docutils' 'python-jinja' 'python-numpy' 'python-pexpect' - 'python-pygments' 'python-twisted' 'python-pytest-xdist') -source=("$pkgname-$pkgver.tar.gz::https://github.com/pytest-dev/pytest/archive/$pkgver.tar.gz") -sha512sums=('aeb3483f57e72d5cab4846e45bb4a2d7b457539bba7ad447456f40ab10862a86c8085ce681e35b5c2cdbda12318358e451ec65a3dc3e5f62d66d9ce4191182c7') - -export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver + 'lsof' 'python-asynctest' 'python-decorator' 'python-docutils' + 'python-jinja' 'python-numpy' 'python-pexpect' 'python-pygments' + 'python-pytest-xdist' 'python-twisted') +source=("https://files.pythonhosted.org/packages/source/p/pytest/pytest-$pkgver.tar.gz") +sha256sums=('131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89') +b2sums=('9dfc87279617be58353566009325f929e6fa53d54fd4c665a75f3b359ab5415972d745a680eb85ab21ca9eaec84450bc1decd50566b0ccdf90d7551f3d03ee70') +# Remove dep on setuptools_scm and workaround test failures prepare() { - sed -i '/_pytest.warning_types.PytestUnknownMarkWarning/a \ "ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning"' pytest-$pkgver/pyproject.toml + cd pytest-$pkgver + sed -i "/^\[metadata\]/a version = $pkgver + /setuptools-scm/d" setup.cfg + sed -i '/setuptools-scm\|wheel/d + /\[tool.setuptools_scm\]/,/^$/d + /_pytest.warning_types.PytestUnknownMarkWarning/a \ "ignore:Creating a LegacyVersion has been deprecated and will be removed in the next major release:DeprecationWarning",' pyproject.toml } build() { @@ -32,13 +39,15 @@ build() { check() { cd pytest-$pkgver - python setup.py egg_info - # pdb tests: https://github.com/pytest-dev/pytest/issues/8161 - PYTHONPATH="$PWD"/build/lib python src/pytest/__main__.py + mkdir -p temp + local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") + python setup.py install --root=temp --optimize=1 --skip-build + PATH="$PWD/temp/usr/bin:$PATH" PYTHONPATH="$PWD/temp/$site_packages" pytest } package() { cd pytest-$pkgver + export PYTHONHASHSEED=0 python setup.py install --root="$pkgdir" --optimize=1 install -D -m644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/ }