db-move: moved webkitgtk-6.0 from [testing] to [extra] (x86_64)
[arch-packages.git] / python-resolvelib / trunk / PKGBUILD
blobc40aeb807a2e67b7631bf12dddba3e69c475aea8
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Felix Yan <felixonmars@archlinux.org>
4 _name=resolvelib
5 pkgname=python-resolvelib
6 pkgver=1.0.1
7 pkgrel=1
8 pkgdesc="Resolve abstract dependencies into concrete ones"
9 url="https://github.com/sarugaku/resolvelib"
10 license=(custom:ISC)
11 arch=(any)
12 depends=(python)
13 makedepends=(
14   python-build
15   python-installer
16   python-setuptools
17   python-wheel
19 checkdepends=(
20   python-commentjson
21   python-packaging
22   python-pytest
24 # test files not in pypi sdist tarballs because of reasons: https://github.com/sarugaku/resolvelib/issues/108
25 source=($_name-$pkgver.tar.gz::https://github.com/sarugaku/resolvelib/archive/refs/tags/$pkgver.tar.gz)
26 sha512sums=('a35f7fdbc3aba5b44fdf6b9c55b082156ca641dfe5825611be6364622bcaaf45faafa2c45bdd13d1b5723a55732759a806905ab4b6f366fba0474d1f808d91bc')
27 b2sums=('7715f61d262cb79ce08f0431650e6213def4582a0774cf36dab722d88013f7bc9c72a31a957d3782e35b315158982c3311fe3e06e26bbf9040fa96b239934661')
29 build() {
30   cd $_name-$pkgver
31   python -m build --wheel --no-isolation
34 check() {
35   local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
37   cd $_name-$pkgver
38   # install to temporary location
39   python -m installer --destdir=test_dir dist/*.whl
40   export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
41   pytest -vv
44 package() {
45   cd $_name-$pkgver
46   python -m installer --destdir="$pkgdir" dist/*.whl
48   install -vDm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/