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

Felix Yan felixonmars at archlinux.org
Sat Oct 26 20:21:45 UTC 2019


    Date: Saturday, October 26, 2019 @ 20:21:45
  Author: felixonmars
Revision: 520484

archrelease: copy trunk to community-staging-any

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

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

Copied: python-hacking/repos/community-staging-any/PKGBUILD (from rev 520481, python-hacking/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2019-10-26 20:21:45 UTC (rev 520484)
@@ -0,0 +1,53 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-hacking
+pkgname=('python-hacking' 'python2-hacking')
+pkgver=1.1.0
+pkgrel=3
+arch=('any')
+pkgdesc='OpenStack Hacking Guideline Enforcement'
+url='https://docs.openstack.org/developer/hacking'
+license=('Apache')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-pbr' 'python2-pbr'
+             'flake8' 'python2-flake8' 'python-mccabe' 'python2-mccabe')
+checkdepends=('python-oslotest' 'python2-oslotest' 'python-testrepository'
+              'python2-testrepository')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack-dev/hacking/archive/$pkgver.tar.gz")
+sha512sums=('25e8fc8585b0de2c9f746a31539d2ee0b6b18685f17cac149bf8cf372d9c31d1f10ac93087d6bcc69b4d1a15b4b3c99cecbe15fe95e903c3de72aba21af32827')
+
+prepare() {
+  sed -e 's/flake8<2.7.0,/flake8/' -e 's/==/>=/' -i hacking-$pkgver/requirements.txt
+  cp -a hacking-$pkgver{,-py2}
+
+  export PBR_VERSION=$pkgver
+}
+
+build() {
+  cd "$srcdir"/hacking-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/hacking-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/hacking-$pkgver
+  python setup.py testr || warning "Tests failed"
+
+  cd "$srcdir"/hacking-$pkgver-py2
+  PYTHON=python2 python2 setup.py testr || warning "Tests failed"
+}
+
+package_python-hacking() {
+  depends=('python-six' 'python-pbr' 'flake8' 'python-mccabe')
+
+  cd hacking-$pkgver
+  python setup.py install --root "$pkgdir" --optimize=1
+}
+
+package_python2-hacking() {
+  depends=('python2-six' 'python2-pbr' 'python2-flake8' 'python2-mccabe')
+
+  cd hacking-$pkgver-py2
+  python2 setup.py install --root "$pkgdir" --optimize=1
+}



More information about the arch-commits mailing list