archrelease: copy trunk to community-any
[arch-community.git] / python-importlib_resources / trunk / PKGBUILD
blobed47f364823a2526c4138436eefdf5e78973c650
1 # Maintainer: David Runge <dvzrv@archlinux.org>
3 _name=importlib_resources
4 pkgname=python-importlib_resources
5 pkgver=5.12.0
6 pkgrel=2
7 pkgdesc="Design and implementation for a planned importlib.resources"
8 arch=(any)
9 url="https://github.com/python/importlib_resources"
10 license=(Apache)
11 depends=(python-zipp)
12 makedepends=(python-build python-installer python-setuptools-scm python-toml python-wheel)
13 checkdepends=(python-pytest python-tests)
14 provides=(python-importlib-resources)
15 source=(https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz)
16 sha512sums=('00875d82cf3d2103872079ee2882c4000cc65141d97988265721cc6861a64dfe480e5c2191a2b22d0b9b9e42de1fc06d54f6d8eb4f37aaf91a819ee9306dc06f')
17 b2sums=('bbae92bd62b54afc0093f8daa8f0fabaf18da7b2c9c578a2e6b6b7cc3207384e4fd037762c4ac8bc862900ac2da112a3b8ae236b1d3ca072c739f2d1ad3edd36')
19 build() {
20   cd $_name-$pkgver
21   python -m build --wheel --no-isolation
24 check() {
25   cd $_name-$pkgver
26   pytest -vv
29 package() {
30   local _site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
32   cd $_name-$pkgver
33   python -m installer --destdir="$pkgdir" dist/*.whl
34   install -vDm 644 README.rst -t "$pkgdir/usr/share/doc/$pkgname/"
35   # remove tests
36   rm -frv "$pkgdir/$_site_packages/$_name/tests/"