archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-scikit-build / trunk / PKGBUILD
blobb5dfe19ab3675e0a443025e4edf81618d198224f
1 # Maintainer: Andrzej Giniewicz <gginiu@gmail.com>
2 # Maintainer: Bruno Pagani <archange@archlinux.org>
3 # Contributor: Martino Pilia <martino.pilia@gmail.com>
4 # Contributor: Ben Greiner <code-arch@bnavigator.de>
6 pkgname=python-scikit-build
7 pkgver=0.17.1
8 pkgrel=2
9 pkgdesc="Improved build system generator for CPython C, C++, Cython and Fortran extensions"
10 arch=(any)
11 url="https://scikit-build.org"
12 license=(MIT)
13 depends=(cmake python-distro python-packaging python-setuptools python-wheel)
14 makedepends=(git python-build python-installer python-hatchling python-hatch-vcs python-hatch-fancy-pypi-readme)
15 checkdepends=(
16     cython
17     gcc
18     gcc-fortran
19     ninja
20     python-build
21     python-path
22     python-pytest
23     python-pytest-mock
24     python-pytest-runner
25     python-pytest-virtualenv
26     python-requests
27     python-six
28     python-virtualenv
30 _tag=6e47f59cb4c0057e5559e02c4d30a0619f636d30 # git rev-parse ${pkgver}
31 source=(git+https://github.com/scikit-build/scikit-build.git#tag=${_tag}?signed)
32 sha256sums=('SKIP')
33 validpgpkeys=(2FDEC9863E5E14C7BC429F27B9D0E45146A241E8) # Henry Schreiner <hschrein@cern.ch>
35 build() {
36   cd scikit-build
37   python -m build --wheel --no-isolation
40 check() {
41   cd scikit-build
42   # Disable coverage
43   sed -i 's|\"--cov\"\, \"--cov-report=xml\"||' noxfile.py
44   # Tests need a rw version of site-packages
45   python -m venv --system-site-packages test-env
46   # https://github.com/scikit-build/scikit-build/issues/727
47   test-env/bin/python /usr/bin/pytest -vv --color=yes || echo "Tests failed"
50 package() {
51   cd scikit-build
52   python -m installer --destdir="$pkgdir" dist/*.whl
53   install -Dm644 LICENSE -t "${pkgdir}"/usr/share/licenses/${pkgname}/