upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-sphinxcontrib-towncrier / repos / community-any / PKGBUILD
blobe51a42890f0289712717d7536f407d4dd2ea982c
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-sphinxcontrib-towncrier
4 pkgver=0.3.2a0
5 pkgrel=5
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"
8 license=('BSD')
9 arch=('any')
10 depends=('python-sphinx' 'towncrier')
11 makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-setuptools-scm'
12              'python-wheel')
13 checkdepends=('python-pytest-xdist')
14 source=(
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')
21 prepare() {
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
32 build() {
33   cd sphinxcontrib-towncrier-$pkgver
34   python -m build -nw
37 check() {
38   cd sphinxcontrib-towncrier-$pkgver
39   PYTHONPATH="$PWD"/src pytest
42 package() {
43   cd sphinxcontrib-towncrier-$pkgver
44   python -m installer -d "$pkgdir" dist/*.whl
45   install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/