archrelease: copy trunk to community-x86_64
[ArchLinux/community.git] / python-awesomeversion / trunk / PKGBUILD
blob50696625772b862e16b1a8386f0dc534e762305d
1 # Maintainer: Jelle van der Waa <jelle@archlinux.org>
2 # Contributor: Giovanni Harting <539@idlegandalf.com>
4 pkgname=python-awesomeversion
5 _name=${pkgname#python-}
6 pkgver=22.9.0
7 pkgrel=3
8 pkgdesc="One version package to rule them all."
9 arch=('any')
10 url="https://github.com/ludeeus/awesomeversion"
11 license=('MIT')
12 depends=(python)
13 makedepends=(python-build python-installer python-poetry-core)
14 checkdepends=('python-pytest')
15 source=("$pkgname-$pkgver.tar.gz::https://github.com/ludeeus/$_name/archive/refs/tags/$pkgver.tar.gz")
16 sha512sums=('261849492c5d30b842c14376e065a35cf9ed716cbb7416828694a12a3a2120c922274604815db0953a56ad6bb5cff76276dc26d69aa03bd578321547107ffec1')
18 prepare() {
19     cd $_name-$pkgver
20     # version = "0"
21     sed -e "s|version = \"0\"|version = \"$pkgver\"|" -i pyproject.toml
24 check() {
25     cd $_name-$pkgver
26     PYTHONPATH=. pytest tests
29 build() {
30     cd $_name-$pkgver
32     python -m build --wheel --no-isolation
35 package() {
36     cd $_name-$pkgver
38     python -m installer --destdir="$pkgdir" dist/*.whl
39     install -Dm644 LICENCE.md "$pkgdir/usr/share/licenses/$pkgname/LICENSE"