archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-calver / trunk / PKGBUILD
blob054438e6f6916bc81f3eb7977281dce6f4c86691
1 # Maintainer: Felix Yan <felixonmars@archlinux.org>
3 pkgname=python-calver
4 pkgver=2022.06.26
5 pkgrel=2
6 pkgdesc="Setuptools extension for CalVer package versions"
7 url="https://github.com/di/calver"
8 license=('Apache')
9 arch=('any')
10 depends=('python')
11 makedepends=('python-setuptools')
12 checkdepends=('python-pytest' 'python-pretend')
13 source=("https://github.com/di/calver/archive/$pkgver/$pkgname-$pkgver.tar.gz")
14 sha512sums=('4d436cead8930cae1a71eddef9f0ecd2881f8cb632c3814dc75390b061a909e7ca969a604a5fded1c66647947856d540e2180bd3ce4bed5087b4dbc9d5edb393')
16 prepare() {
17   cd calver-$pkgver
18   echo "Version: $pkgver" > PKG-INFO
21 build() {
22   cd calver-$pkgver
23   python setup.py build
26 check() {
27   cd calver-$pkgver
28   mv PKG-INFO PKG-INFO.bak
29   PYTHONPATH="$PWD"/build/lib pytest
30   mv PKG-INFO.bak PKG-INFO
33 package() {
34   cd calver-$pkgver
35   python setup.py install --root="$pkgdir" --optimize=1