aports/testing/py3-poetry-dynamic-versioning/APKBUILD

37 lines
1.2 KiB
Text

# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=py3-poetry-dynamic-versioning
pkgver=1.7.1
pkgrel=0
pkgdesc="Plugin for Poetry to enable dynamic versioning based on VCS tags"
url="https://github.com/mtkennerly/poetry-dynamic-versioning"
arch="noarch"
license="MIT"
depends="py3-dunamai py3-tomlkit py3-jinja2 py3-poetry-core"
makedepends="py3-gpep517 py3-poetry-core py3-wheel py3-installer"
checkdepends="py3-pytest"
subpackages="$pkgname-pyc"
source="https://github.com/mtkennerly/poetry-dynamic-versioning/archive/v$pkgver/py3-poetry-dynamic-versioning-$pkgver.tar.gz"
builddir="$srcdir/poetry-dynamic-versioning-$pkgver"
options="!check" # tests require a git repo
build() {
gpep517 build-wheel \
--wheel-dir .dist \
--output-fd 3 3>&1 >&2
}
check() {
python3 -m venv --clear --without-pip --system-site-packages .testenv
.testenv/bin/python3 -m installer .dist/*.whl
.testenv/bin/python3 -m pytest
}
package() {
python3 -m installer -d "$pkgdir" \
.dist/*.whl
}
sha512sums="
101d482c1ecaa89f8cf7196a87378ae9ecea0bba0938702f938f4284e77c9a9cd39d03687b324c03bec8b93474b6eeb96442250be71bad19f5c55e45a66b4c08 py3-poetry-dynamic-versioning-1.7.1.tar.gz
"