1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-sphinxcontrib-towncrier
6 pkgdesc="An RST directive for injecting a Towncrier-generated changelog draft containing fragments for the unreleased (next) project version"
7 url="https://github.com/sphinx-contrib/sphinxcontrib-towncrier"
10 depends=('python-sphinx' 'towncrier')
11 makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-setuptools-scm'
13 checkdepends=('python-pytest-xdist')
15 "https://github.com/sphinx-contrib/sphinxcontrib-towncrier/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
16 0001-Update-build-system-dependencies.patch
18 sha512sums=('3194136b8758b2881687af5a4fe56d1524fb6c0fe77745b25632895a6c7b6ed4a052d5cf000acabf9fb7c2ebce2e7e0a907d143d014d7be275f61547c0c76122'
19 'e8c5f943e4ad8990a97a6aa8e493a1346cd9725a08c2b3e6ab0f3eb9371b9a63a55bad242060916f8a5ebfefe2a4c5c96b9a73291996fe3a4693c9b0920ca6b8')
22 cd sphinxcontrib-towncrier-$pkgver
23 # remove requirement for python-setuptools-scm-git-archive: https://github.com/sphinx-contrib/sphinxcontrib-towncrier/pull/80
24 patch -Np1 -i ../0001-Update-build-system-dependencies.patch
26 sed -i '/pytest_cov/d;/--cov/d' pytest.ini
28 # Do not treat warnings as errors
29 sed -i '/^ error$/d' pytest.ini
33 cd sphinxcontrib-towncrier-$pkgver
38 cd sphinxcontrib-towncrier-$pkgver
39 PYTHONPATH="$PWD"/src pytest
43 cd sphinxcontrib-towncrier-$pkgver
44 python -m installer -d "$pkgdir" dist/*.whl
45 install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/