1 # Maintainer: George Rawlinson <grawlinson@archlinux.org>
3 pkgname=python-poetry-plugin-tweak-dependencies-version
6 pkgdesc='Poetry plugin used to tweak dependency versions'
8 url='https://github.com/sbrunner/poetry-plugin-tweak-dependencies-version'
20 'python-poetry-dynamic-versioning'
22 _commit='c5bf57c55ee0c998ee1ef49173238946c55566ac'
24 "$pkgname::git+$url#commit=$_commit"
25 'fix-package-version.patch'
28 '042afd4ef5458b22aa5fb5463e86ad94790e420a1992cddf926cfc6c68e5a3bfd55f98c45a2ce3a9776c14247eef83f062831ba9e4c371be975bc0737f542254')
33 git describe --tags | sed 's/^v//'
39 patch -p1 -i "$srcdir/fix-package-version.patch"
41 # properly set package version
42 sed -e "s/@PKGVER@/$pkgver/" -i pyproject.toml
48 python -m build --wheel --no-isolation
54 python -m installer --destdir="$pkgdir" dist/*.whl
57 local site_packages=$(python -c "import site; print(site.getsitepackages()[0])")
58 install -d "$pkgdir/usr/share/licenses/$pkgname"
59 ln -s "$site_packages/poetry_plugin_tweak_dependencies_version-$pkgver.dist-info/LICENSE" \
60 "$pkgdir/usr/share/licenses/$pkgname/LICENSE"