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

Felix Yan felixonmars at gemini.archlinux.org
Tue Nov 30 19:21:09 UTC 2021


    Date: Tuesday, November 30, 2021 @ 19:21:09
  Author: felixonmars
Revision: 1057903

archrelease: copy trunk to community-staging-any

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

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

Copied: python-pbr/repos/community-staging-any/PKGBUILD (from rev 1057902, python-pbr/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2021-11-30 19:21:09 UTC (rev 1057903)
@@ -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.7.0
+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=('64d1d2170f95ffba2ece3cc9b899241158621fe714ad71d71bb4f5ad04f71ce1c87c94ef5c5fe38ec9b422989b2e7ff6069e9551a29295f3b42caf5fc78bbe58')
+
+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