[arch-commits] Commit in python-semver/repos (community-any community-any/PKGBUILD)
Felix Yan
felixonmars at archlinux.org
Fri Aug 17 08:11:11 UTC 2018
Date: Friday, August 17, 2018 @ 08:11:10
Author: felixonmars
Revision: 372262
archrelease: copy trunk to community-any
Added:
python-semver/repos/community-any/
python-semver/repos/community-any/PKGBUILD
(from rev 372261, python-semver/trunk/PKGBUILD)
----------+
PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
Copied: python-semver/repos/community-any/PKGBUILD (from rev 372261, python-semver/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD (rev 0)
+++ community-any/PKGBUILD 2018-08-17 08:11:10 UTC (rev 372262)
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-semver
+pkgname=(python-semver python2-semver)
+pkgver=2.8.1
+pkgrel=1
+pkgdesc="Python helper for Semantic Versioning"
+url="https://github.com/k-bx/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