1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
6 pkgdesc='A library for producing dynamic version strings, derived from VCS tags'
8 url='https://github.com/mtkennerly/dunamai'
20 checkdepends=('python-pytest' 'python-setuptools')
21 _commit='fe69436133d0ea2097a9fed1dbb31ec96263cf83'
22 source=("$pkgname::git+$url#commit=$_commit")
28 git describe --tags | sed 's/^v//'
34 python -m build --wheel --no-isolation
40 # temporary install so that:
41 # * pkg_resources can pick up the package
42 # * the required binary can be added to $PATH
43 python -m installer --destdir="$(pwd)/tmp" dist/*.whl
44 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
45 export PATH="$(pwd)/tmp/usr/bin:$PATH"
46 export PYTHONPATH="$(pwd)/tmp/$site_packages"
48 # run tests, skipping annoying ones that require messing with global git config
50 --deselect tests/integration/test_dunamai.py::test__version__from_git__with_annotated_tags \
51 --deselect tests/integration/test_dunamai.py::test__version__from_git__with_lightweight_tags \
52 --deselect tests/integration/test_dunamai.py::test__version__from_git__with_mixed_tags \
53 --deselect tests/integration/test_dunamai.py::test__version__from_git__with_nonchronological_commits \
54 --deselect tests/integration/test_dunamai.py::test__version__from_git__gitflow
60 python -m installer --destdir="$pkgdir" dist/*.whl
63 install -vDm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE