summaryrefslogtreecommitdiffstats
path: root/abs
diff options
context:
space:
mode:
authorBritney Fransen <brfransen@gmail.com>2018-03-01 17:19:44 (GMT)
committerBritney Fransen <brfransen@gmail.com>2018-03-01 17:19:44 (GMT)
commit82f81b40efdf2d5a31239e95de67a4af51b991a5 (patch)
tree8449b6f2fe74b897b37f4a71ecc1571abadca18b /abs
parent076fa326400cdbe381d6965d8e6cc417c8c381a0 (diff)
downloadlinhes_pkgbuild-82f81b40efdf2d5a31239e95de67a4af51b991a5.zip
linhes_pkgbuild-82f81b40efdf2d5a31239e95de67a4af51b991a5.tar.gz
linhes_pkgbuild-82f81b40efdf2d5a31239e95de67a4af51b991a5.tar.bz2
python-pbr: dep of python-mock
Diffstat (limited to 'abs')
-rw-r--r--abs/core/python_modules/python-pbr/PKGBUILD61
1 files changed, 61 insertions, 0 deletions
diff --git a/abs/core/python_modules/python-pbr/PKGBUILD b/abs/core/python_modules/python-pbr/PKGBUILD
new file mode 100644
index 0000000..1a0ab63
--- /dev/null
+++ b/abs/core/python_modules/python-pbr/PKGBUILD
@@ -0,0 +1,61 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars@archlinux.org>
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Limao Luo <luolimao+AUR@gmail.com>
+
+pkgbase=python-pbr
+pkgname=(python-pbr python2-pbr)
+pkgver=3.1.1
+pkgrel=1
+pkgdesc="Python Build Reasonableness"
+arch=('any')
+url='https://pypi.python.org/pypi/pbr'
+license=('Apache')
+makedepends=('python2-setuptools' 'python-setuptools' 'git')
+checkdepends=('python-testscenarios' 'python2-testscenarios' 'python-testrepository' 'python2-testrepository'
+ 'python-testresources' 'python2-testresources' 'python-mock' 'python2-mock' 'python-virtualenv'
+ 'python2-virtualenv' 'python-wheel' 'python2-wheel' 'python-sphinx' 'python2-sphinx')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack-dev/pbr/archive/$pkgver.tar.gz")
+sha512sums=('c96079408f7ec0ac2e84f94e0cec5b1e6f2ca80460556cbef11568ad8a0f4bf760d5c3451fea408cd6e12acf136254d2769726310911d2e6871cea4bebdb4670')
+
+prepare() {
+ cp -a pbr-$pkgver{,-py2}
+
+ find pbr-$pkgver-py2 -name \*.py -exec sed -i '1s/python$/&2/' {} +
+
+ export PBR_VERSION=$pkgver
+}
+
+build() {
+ cd "$srcdir"/pbr-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/pbr-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/pbr-$pkgver
+ python setup.py testr || warning "Tests failed"
+
+ cd "$srcdir"/pbr-$pkgver-py2
+ PYTHON=python2 python2 setup.py testr || warning "Tests failed"
+}
+
+package_python-pbr() {
+ depends=('python-setuptools')
+
+ cd pbr-$pkgver
+ python setup.py install -O1 --root="$pkgdir"
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-pbr() {
+ depends=('python2-setuptools')
+
+ cd pbr-$pkgver-py2
+ python2 setup.py install -O1 --root="$pkgdir"
+ install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+ mv "$pkgdir"/usr/bin/pbr{,2}
+}