archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-pytest-responsemock / trunk / PKGBUILD
blob540f5f047ebb093c38228303a22462253220a6f5
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=pytest-responsemock
4 pkgname=python-pytest-responsemock
5 pkgver=1.1.1
6 pkgrel=3
7 pkgdesc="Simplified requests calls mocking for pytest"
8 arch=(any)
9 url="https://github.com/idlesign/pytest-responsemock"
10 license=(BSD)
11 depends=(
12   python
13   python-pytest
14   python-responses
16 makedepends=(
17   python-build
18   python-installer
19   python-setuptools
20   python-wheel
22 checkdepends=(python-requests)
23 source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
24 sha512sums=('276b01afed3813a357d61dd0fb557824fc8001ae3c2f507bdcb05e12a5e2014e68102a14fc38e0565c304f963e5a5d152163e587fb55d0c46fea5f28a68ff247')
25 b2sums=('cbf90544a1e4c9a73e524c25a5bf0d418523ac4ae5576f42454ff9bbd81ecdf4d27daa7c0e433acd8fd9dc365992714d60ef73a5ddbe6ec45e4d1fb2076324c3')
27 build() {
28   cd $_name-$pkgver
29   python -m build --wheel --no-isolation
32 check() {
33   local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
35   cd $_name-$pkgver
36   python -m installer --destdir=test_dir dist/*.whl
37   export PYTHONPATH="test_dir/$site_packages:$PYTHONPATH"
38   pytest -v -k "not test_bypass"
41 package() {
42   cd $_name-$pkgver
43   python -m installer --destdir="$pkgdir" dist/*.whl
44   install -vDm 644 {AUTHORS,CHANGELOG,README.rst} -t "$pkgdir/usr/share/doc/$pkgname/"
45   install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"