summaryrefslogtreecommitdiffstats
path: root/abs
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2018-04-11 20:20:56 (GMT)
committerBritney Fransen <brfransen@gmail.com>2018-04-11 20:20:56 (GMT)
commitc520a4961ff20c138951023bb68f8320c7c19add (patch)
tree536d084d29f9f13bfc3112a1f9e83db396c43d9b /abs
parent0e4fe3801b46b92ad14a24b9f386e61e3d457b65 (diff)
downloadlinhes_pkgbuild-c520a4961ff20c138951023bb68f8320c7c19add.zip
linhes_pkgbuild-c520a4961ff20c138951023bb68f8320c7c19add.tar.gz
linhes_pkgbuild-c520a4961ff20c138951023bb68f8320c7c19add.tar.bz2
python-vcversioner: dep
Diffstat (limited to 'abs')
-rw-r--r--abs/core/python_modules/python-vcversioner/PKGBUILD52
1 files changed, 52 insertions, 0 deletions
diff --git a/abs/core/python_modules/python-vcversioner/PKGBUILD b/abs/core/python_modules/python-vcversioner/PKGBUILD
new file mode 100644
index 0000000..4727326
--- /dev/null
+++ b/abs/core/python_modules/python-vcversioner/PKGBUILD
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars@archlinux.org>
+
+pkgbase=python-vcversioner
+pkgname=(python-vcversioner python2-vcversioner)
+pkgver=2.16.0.0
+pkgrel=1
+pkgdesc="Use version control tags to discover version numbers"
+url="https://github.com/habnabit/vcversioner"
+license=('ISC')
+arch=('any')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner')
+source=("$pkgbase-$pkgver.tar.bz2::https://github.com/habnabit/vcversioner/archive/$pkgver.tar.gz")
+sha512sums=('0ce7edf28d0626707f977b565f938a754d374d0cada8683f05fa6d1088930d4d858213dbcb5dba149d828e76341eec4a168ef1998ce9894b72c35c1eef59bd08')
+
+prepare() {
+ echo -n "$pkgver-0-UNKNOWN" > vcversioner-$pkgver/version.txt
+ cp -a vcversioner-$pkgver{,-py2}
+}
+
+build() {
+ cd "$srcdir"/vcversioner-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/vcversioner-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/vcversioner-$pkgver
+ python setup.py pytest
+
+ cd "$srcdir"/vcversioner-$pkgver-py2
+ python2 setup.py pytest
+}
+
+package_python-vcversioner() {
+ depends=('python')
+
+ cd vcversioner-$pkgver
+ python3 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+}
+
+package_python2-vcversioner() {
+ depends=('python2')
+
+ cd vcversioner-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+}