archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-sphinxcontrib-programoutput / trunk / PKGBUILD
blobb122f78e35bbd56b32b7ba958e59480fa6b3175e
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=sphinxcontrib-programoutput
4 pkgname=python-sphinxcontrib-programoutput
5 pkgver=0.17
6 pkgrel=4
7 pkgdesc="Sphinx extension for capturing program output"
8 arch=(any)
9 url="https://sphinxcontrib-programoutput.readthedocs.io/en/latest/"
10 license=(BSD)
11 depends=(python-sphinx)
12 makedepends=(python-build python-installer python-setuptools python-wheel)
13 checkdepends=(python-pytest)
14 source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
15 sha256sums=('300ee9b8caee8355d25cc74b4d1c7efd12e608d2ad165e3141d31e6fbc152b7f')
16 b2sums=('07687a221aa9be1e02629b2961b49eace217631a1298337f77a01986c3c6444a50069a8a8b9c96ca224895ae0f9490158a720519fdf3fb544e9d3e513282eb36')
18 build() {
19   cd $_name-$pkgver
20   python -m build --wheel --no-isolation
23 check() {
24   local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
26   cd $_name-$pkgver
27   python -m installer --destdir=test_dir dist/*.whl
28   export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
30   pytest -vv test_dir/$_site_packages
33 package() {
34   cd $_name-$pkgver
35   python -m installer --destdir="$pkgdir" dist/*.whl
36   install -vDm 644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
37   install -vDm 644 {CHANGES,README}.rst -t "$pkgdir/usr/share/doc/$pkgname/"