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

Felix Yan felixonmars at archlinux.org
Sun Dec 22 18:49:44 UTC 2019


    Date: Sunday, December 22, 2019 @ 18:49:44
  Author: felixonmars
Revision: 538879

archrelease: copy trunk to community-testing-any

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

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

Copied: python-hacking/repos/community-testing-any/PKGBUILD (from rev 538878, python-hacking/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2019-12-22 18:49:44 UTC (rev 538879)
@@ -0,0 +1,51 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-hacking
+pkgname=('python-hacking' 'python2-hacking')
+pkgver=2.0.0
+pkgrel=1
+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')
+checkdepends=('python-oslotest' 'python2-oslotest')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack-dev/hacking/archive/$pkgver.tar.gz")
+sha512sums=('33cb147afe122fa55636122fc858704f052e469c9091fe8bc5763937f9e6150d7686c2c253fca6319ff3108dae1ae19eebfe9d425c722762599033696f9180c0')
+
+export PBR_VERSION=$pkgver
+
+prepare() {
+  cp -a hacking-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir"/hacking-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/hacking-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/hacking-$pkgver
+  stestr run
+
+  cd "$srcdir"/hacking-$pkgver-py2
+  PYTHON=python2 stestr run
+}
+
+package_python-hacking() {
+  depends=('python-six' 'flake8')
+
+  cd hacking-$pkgver
+  python setup.py install --root "$pkgdir" --optimize=1
+}
+
+package_python2-hacking() {
+  depends=('python2-six' 'python2-flake8')
+
+  cd hacking-$pkgver-py2
+  python2 setup.py install --root "$pkgdir" --optimize=1
+}



More information about the arch-commits mailing list