archrelease: copy trunk to extra-x86_64
[arch-packages.git] / python-resolvelib / trunk / PKGBUILD
blob097daffb98efec4b2573b275d600473fc54d659f
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Felix Yan <felixonmars@archlinux.org>
4 _name=resolvelib
5 pkgname=python-resolvelib
6 pkgver=0.8.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=(python-build python-installer python-setuptools python-wheel)
14 checkdepends=(python-commentjson python-packaging python-pytest)
15 # test files not in pypi sdist tarballs: https://github.com/sarugaku/resolvelib/issues/108
16 # source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
17 source=($_name-$pkgver.tar.gz::https://github.com/sarugaku/resolvelib/archive/refs/tags/$pkgver.tar.gz)
18 sha512sums=('bc99d0661f3605d97074066df3c57edec8db40f66111f0d7a23ad88097ba4a162368ab396ef75632d09cd8a76417fbee2554d0cdb2f797795c246d16e7e3b955')
19 b2sums=('59bb02a08cf0f9bc6070cd5c5109826a7cacc5bda07479358fd591ff018bad761b53ed48f0a330e5ef60b8fa8d5db14ef044b662423e372aad7fc477df5b97ef')
21 build() {
22   cd $_name-$pkgver
23   python -m build --wheel --no-isolation
26 check() {
27   local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
29   cd $_name-$pkgver
30   # install to temporary location
31   python -m installer --destdir=test_dir dist/*.whl
32   export PYTHONPATH="test_dir/$_site_packages:$PYTHONPATH"
33   pytest -vv
36 package() {
37   cd $_name-$pkgver
38   python -m installer --destdir="$pkgdir" dist/*.whl
40   install -vDm 644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/