upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-diff-cover / trunk / PKGBUILD
blob38bc426da71c433e8767d78deac8b9c563b6edac
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=diff_cover
4 pkgname=python-diff-cover
5 pkgver=7.5.0
6 pkgrel=2
7 pkgdesc="Automatically find diff lines that need test coverage"
8 arch=(any)
9 url="https://github.com/Bachmann1234/diff_cover"
10 license=(Apache)
11 depends=(python-chardet python-jinja python-pluggy python-pygments)
12 makedepends=(python-build python-installer python-poetry-core python-wheel)
13 checkdepends=(python-pytest python-pytest-mock python-tomli)
14 optdepends=('python-tomli: for TOML support')
15 source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz{,.asc})
16 sha512sums=('3e3455fa89873554e0912a2bdf855fcc91a52ae801c1af80e4e32547a0fd5da8d5724eadddb5f7874b3dbf7f206c14b185eea4938de09dd03e72c29613a4cb1b'
17             'SKIP')
18 b2sums=('6f6743bca81a2f3d893a19336a44d7638659eb065f31220dd74e58f063babd0d5fe49b4c729ed1c376afeabe12ec3f1996c19ac315bd08aabe8381e7dcccf675'
19         'SKIP')
20 validpgpkeys=('54CAEABCAC2956D407348256972401BDE60128CB') # Matt Bachmann <matt.bachmann@lola.com>
22 build() {
23   cd $_name-$pkgver
24   python -m build --wheel --no-isolation
27 check() {
28   local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
30   cd $_name-$pkgver
31   # install to temporary location, as importlib is used
32   python -m installer --destdir=test_dir dist/*.whl
33   export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
34   # ignore integration and code style checks
35   pytest -vv --ignore 'tests/test_integration.py' --ignore 'tests/test_violations_reporter.py' --ignore 'tests/test_clover_violations_reporter.py'
38 package() {
39   cd $_name-$pkgver
40   python -m installer --destdir="$pkgdir" dist/*.whl
41   install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"