upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-pytest-xprocess / trunk / PKGBUILD
bloba7c1b2323657ff4faf994e5f05285e8be10b2f04
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Hugo Osvaldo Barrera <hugo@barrera.io>
3 # Contributor: Neil Santos <nsantos16+aur@gmail.com>
5 _name=pytest-xprocess
6 pkgname=python-pytest-xprocess
7 pkgver=0.22.2
8 pkgrel=2
9 pkgdesc='Pytest plugin to manage external processes across test runs.'
10 arch=(any)
11 url="https://github.com/pytest-dev/pytest-xprocess"
12 license=(MIT)
13 depends=(python-psutil python-py python-pytest)
14 makedepends=(python-build python-installer python-setuptools-scm python-wheel)
15 source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
16 sha512sums=('2051be110dfda8063c31bb9555bff569f5d7a1332a62f8ce57fd799dfc7d8551ba1227df12f44fccc1ec62d9fcc0face104a77c9c5cc1abb583b74cd1d8a9ff7')
17 b2sums=('07b9fdfea2ecd3d3aaf4115c2f7ecd41c864b4490694cedc54460d0f16397ebdda0ac88fd9bd1613dcaec1cb9c36571b8ab2febc8d151f8f6c4e19fe3abd0821')
19 build() {
20   cd $_name-$pkgver
21   python -m build --wheel --no-isolation
24 check() {
25   local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
27   cd $_name-$pkgver
28   # install to temporary location
29   python -m installer --destdir=test_dir dist/*.whl
30   export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
31   # issues with some tests at least since 0.18.1: https://github.com/pytest-dev/pytest-xprocess/issues/95
32   pytest -vv -k "not test_interruption_cleanup and not test_interruption_does_not_cleanup"
35 package() {
36   cd $_name-$pkgver
37   python -m installer --destdir="$pkgdir" dist/*.whl
38   install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
39   install -vDm 644 {CHANGELOG,README}.rst -t "$pkgdir/usr/share/$pkgname/"