[arch-commits] Commit in python-semver/repos (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Fri Oct 25 16:22:57 UTC 2019
Date: Friday, October 25, 2019 @ 16:22:56
Author: foutrelis
Revision: 519439
archrelease: copy trunk to community-staging-any
Added:
python-semver/repos/community-staging-any/
python-semver/repos/community-staging-any/PKGBUILD
(from rev 519438, python-semver/trunk/PKGBUILD)
----------+
PKGBUILD | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 51 insertions(+)
Copied: python-semver/repos/community-staging-any/PKGBUILD (from rev 519438, python-semver/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2019-10-25 16:22:56 UTC (rev 519439)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-semver
+pkgname=(python-semver python2-semver)
+pkgver=2.8.1
+pkgrel=2
+pkgdesc="Python helper for Semantic Versioning"
+url="https://github.com/k-bx/python-semver"
+license=('BSD')
+arch=('any')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/k-bx/python-semver/archive/$pkgver.tar.gz")
+sha512sums=('a457b1a170b309ee563955e4c506de56a061acd4e7e92a58fd8bd78801e33207fbc5e0e026fc0ea243301bf9ecfe0b219c0d95681aa10066480cbd3974e17d3a')
+
+prepare() {
+ sed -i '/tests_require/d' python-semver-$pkgver/setup.py
+ cp -a python-semver-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/python-semver-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/python-semver-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/python-semver-$pkgver
+ python setup.py pytest
+
+ cd "$srcdir"/python-semver-$pkgver-py2
+ python2 setup.py pytest
+}
+
+package_python-semver() {
+ depends=('python')
+
+ cd python-semver-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+}
+
+package_python2-semver() {
+ depends=('python2')
+
+ cd python-semver-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+}
More information about the arch-commits
mailing list