[arch-commits] Commit in (4 files)

Felix Yan felixonmars at archlinux.org
Thu Jan 19 07:37:31 UTC 2017


    Date: Thursday, January 19, 2017 @ 07:37:31
  Author: felixonmars
Revision: 207982

addpkg: python-hacking 0.13.0-1

Added:
  python-hacking/
  python-hacking/repos/
  python-hacking/trunk/
  python-hacking/trunk/PKGBUILD

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

Added: python-hacking/trunk/PKGBUILD
===================================================================
--- python-hacking/trunk/PKGBUILD	                        (rev 0)
+++ python-hacking/trunk/PKGBUILD	2017-01-19 07:37:31 UTC (rev 207982)
@@ -0,0 +1,53 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-hacking
+pkgname=('python-hacking' 'python2-hacking')
+pkgver=0.13.0
+pkgrel=1
+arch=('any')
+pkgdesc='OpenStack Hacking Guideline Enforcement'
+url='http://docs.openstack.org/developer/hacking'
+license=('Apache')
+makedepends=('git' 'python-setuptools' 'python2-setuptools' 'python-pbr' 'python2-pbr'
+             'flake8' 'python2-flake8' 'python-mccabe' 'python2-mccabe')
+checkdepends=('python-oslotest' 'python2-oslotest')
+source=("git+https://git.openstack.org/openstack-dev/hacking#tag=$pkgver")
+sha512sums=('SKIP')
+
+prepare() {
+  sed -e 's/flake8<2.6.0,/flake8/' -e 's/==/>=/' -i hacking/requirements.txt
+  sed -e 's/pep8/pycodestyle/' -i hacking/{requirements.txt,hacking/tests/*.py,hacking/core.py}
+  sed -e 's/from flake8 import engine/from flake8.api import legacy as engine/' -i hacking/hacking/tests/*.py
+  cp -a hacking{,-py2}
+}
+
+build() {
+  cd "$srcdir"/hacking
+  python setup.py build
+
+  cd "$srcdir"/hacking-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/hacking
+  python setup.py testr || warning "Tests failed"
+
+  cd "$srcdir"/hacking-py2
+  PYTHON=python2 python2 setup.py testr || warning "Tests failed"
+}
+
+package_python-hacking() {
+  depends=('python-six' 'python-pbr' 'flake8' 'python-mccabe')
+
+  cd hacking
+  python setup.py install --root "$pkgdir" --optimize=1
+}
+
+package_python2-hacking() {
+  depends=('python2-six' 'python2-pbr' 'python2-flake8' 'python2-mccabe')
+
+  cd hacking-py2
+  python2 setup.py install --root "$pkgdir" --optimize=1
+}


Property changes on: python-hacking/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+Id
\ No newline at end of property



More information about the arch-commits mailing list