Date: Friday, April 7, 2023 @ 04:07:06
Author: felixonmars
Revision: 1440452
archrelease: copy trunk to community-staging-any
Added:
python-semver/repos/community-staging-any/
python-semver/repos/community-staging-any/PKGBUILD
(from rev 1440451, python-semver/trunk/PKGBUILD)
----------+
PKGBUILD | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
Copied: python-semver/repos/community-staging-any/PKGBUILD (from rev 1440451,
python-semver/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-07 04:07:06 UTC (rev 1440452)
@@ -0,0 +1,38 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=python-semver
+pkgver=2.13.0
+pkgrel=6
+pkgdesc="Python helper for Semantic Versioning"
+url="https://github.com/k-bx/python-semver"
+license=('BSD')
+arch=('any')
+depends=('python')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest-runner' 'python-pytest-cov')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/k-bx/python-semver/archive/$pkgver.tar.gz"
+
fix-tests-for-python-3-10.patch::https://github.com/python-semver/python-semver/commit/8d72677cf964365c8db033fbd436ff5dd342fb1b.patch)
+sha512sums=('ca0d408d8bb7305e90802ea04d935cd7b76b8f166a9ec97ed3427dbc2cf60eeca0b2d27ad0cb2f15f32f5b2589d6717a63717c463183374c5335bf79e1eec222'
+
'3ccfc7bb5519f463d1ed834b2b7401dc0a01695f91f94f6e3a15ba1eec20f77485b1851566cf44d8a390fa087fe4bb12fd158767620695c313a265da103366fe')
+
+prepare() {
+ cd "$srcdir"/python-semver-$pkgver
+ sed -i '/tests_require/d' setup.py
+ patch -p1 <"$srcdir"/fix-tests-for-python-3-10.patch
+}
+
+build() {
+ cd "$srcdir"/python-semver-$pkgver
+ python setup.py build
+}
+
+check() {
+ cd "$srcdir"/python-semver-$pkgver
+ python setup.py pytest
+}
+
+package() {
+ cd python-semver-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+}