[arch-commits] Commit in python-pbr/repos (2 files)

Felix Yan fyan at archlinux.org
Tue Apr 12 15:40:04 UTC 2016


    Date: Tuesday, April 12, 2016 @ 17:40:04
  Author: fyan
Revision: 170771

archrelease: copy trunk to community-testing-any

Added:
  python-pbr/repos/community-testing-any/
  python-pbr/repos/community-testing-any/PKGBUILD
    (from rev 170770, python-pbr/trunk/PKGBUILD)

----------+
 PKGBUILD |   59 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

Copied: python-pbr/repos/community-testing-any/PKGBUILD (from rev 170770, python-pbr/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2016-04-12 15:40:04 UTC (rev 170771)
@@ -0,0 +1,59 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+# Contributor: Limao Luo <luolimao+AUR at gmail.com>
+
+pkgbase=python-pbr
+pkgname=(python-pbr python2-pbr)
+pkgver=1.9.0
+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=(http://pypi.python.org/packages/source/p/pbr/pbr-$pkgver.tar.gz)
+sha512sums=('1be1c9d610fbde82dcd81892deef3fb7b5b1e16dad6934ff3f41e8f77108b9e807a0ceaeeb2dddabecb243719f562a9701a6bf351f370e2fca4e643e86a75664')
+
+prepare() {
+  cp -a pbr-$pkgver{,-py2}
+
+  find pbr-$pkgver-py2 -name \*.py -exec sed -i '1s/python$/&2/' {} +
+}
+
+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 test || warning "Tests failed"
+
+  cd "$srcdir"/pbr-$pkgver-py2
+  PYTHON=python2 python2 setup.py test || 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}
+}



More information about the arch-commits mailing list