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

Felix Yan felixonmars at archlinux.org
Mon Nov 9 15:48:19 UTC 2020


    Date: Monday, November 9, 2020 @ 15:48:18
  Author: felixonmars
Revision: 747155

archrelease: copy trunk to community-staging-any

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

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

Copied: python-pbr/repos/community-staging-any/PKGBUILD (from rev 747153, python-pbr/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2020-11-09 15:48:18 UTC (rev 747155)
@@ -0,0 +1,58 @@
+# 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=5.5.1
+pkgrel=2
+pkgdesc="Python Build Reasonableness"
+arch=('any')
+url='https://pypi.python.org/pypi/pbr'
+license=('Apache')
+makedepends=('python2-setuptools' 'python-setuptools' 'git')
+checkdepends=('python-stestr' 'python-testscenarios' 'python-testresources' 'python-testrepository'
+              'python-mock' 'python-virtualenv' 'python-wheel' 'python-sphinx')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack-dev/pbr/archive/$pkgver.tar.gz")
+sha512sums=('412a2d459869714b870ef11c3f98eff9647a0d0b91b1e7632a7cbbffe071a39e47a0d5e7698857202ae6ae0aa4d7b952491318f0891bb9c5fd8bb2806c81a689')
+
+export PBR_VERSION=$pkgver
+
+prepare() {
+  sed -i 's/virtualenv.create_environment(path, clear=True)/virtualenv.cli_run([path, "--clear"])/' pbr-$pkgver/pbr/tests/test_packaging.py
+
+  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 pbr-$pkgver
+  stestr run
+}
+
+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