archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-extension-helpers / trunk / PKGBUILD
blob217001e37d60288044f12ad715e80eec061fa08b
1 # Maintainer: Bruno Pagani <archange@archlinux.org>
2 # Contributor: Médéric Boquien <mboquien@free.fr>
4 _pkg=extension-helpers
5 pkgname=python-${_pkg}
6 pkgver=1.0.0
7 pkgrel=3
8 pkgdesc="Utilities for building and installing packages with compiled extensions"
9 arch=(any)
10 url="https://github.com/astropy/extension-helpers"
11 license=(BSD)
12 depends=(python-setuptools)
13 makedepends=(python-build python-installer python-setuptools-scm python-wheel)
14 checkdepends=(python-pytest)
15 source=(https://files.pythonhosted.org/packages/source/e/${_pkg}/${_pkg}-${pkgver}.tar.gz)
16 sha256sums=('ca1bfac67c79cf4a7a0c09286ce2a24eec31bf17715818d0726318dd0e5050e6')
18 build() {
19   cd ${_pkg}-${pkgver}
20   python -m build --wheel --no-isolation
23 check() {
24   cd ${_pkg}-${pkgver}/build/lib/extension_helpers
25   # Some strange failures but no time to investigate
26   pytest -vv --color=yes || echo "Tests failed"
29 package() {
30   cd ${_pkg}-${pkgver}
31   python -m installer --destdir="$pkgdir" dist/*.whl
32   rm -r "${pkgdir}"$(python -c "import site; print(site.getsitepackages()[0])")/extension_helpers/tests
33   install -Dm644 LICENSE.rst -t "${pkgdir}"/usr/share/licenses/$pkgname/