[arch-commits] Commit in python-hacking/repos/community-any (PKGBUILD PKGBUILD)

Felix Yan felixonmars at archlinux.org
Wed Sep 13 07:51:36 UTC 2017


    Date: Wednesday, September 13, 2017 @ 07:51:35
  Author: felixonmars
Revision: 257316

archrelease: copy trunk to community-any

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

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

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2017-09-13 07:50:59 UTC (rev 257315)
+++ PKGBUILD	2017-09-13 07:51:35 UTC (rev 257316)
@@ -1,53 +0,0 @@
-# $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
-}

Copied: python-hacking/repos/community-any/PKGBUILD (from rev 257315, python-hacking/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2017-09-13 07:51:35 UTC (rev 257316)
@@ -0,0 +1,60 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-hacking
+pkgname=('python-hacking' 'python2-hacking')
+pkgver=1.0.0
+pkgrel=1
+arch=('any')
+pkgdesc='OpenStack Hacking Guideline Enforcement'
+url='http://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')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack-dev/hacking/archive/$pkgver.tar.gz")
+sha512sums=('664f0a9bfc5c4d9154d8e4b61e41e788a6e1138ed37b10a63409852b1bf633632767e6eddbfeb497b3158590630c56a5d7dcf5d27a31ca98d79f2e9c4df7d19b')
+
+prepare() {
+  sed -e 's/flake8<2.6.0,/flake8/' -e 's/==/>=/' -i hacking-$pkgver/requirements.txt
+  sed -e 's/pep8/pycodestyle/' -i hacking-$pkgver/{requirements.txt,hacking/tests/*.py,hacking/core.py}
+  sed -e 's/from flake8 import engine/from flake8.api import legacy as engine/' -i hacking-$pkgver/hacking/tests/*.py
+  sed -e '/pycodestyle.BaseReport/i \        self.options.benchmark_keys = pycodestyle.BENCHMARK_KEYS' -i hacking-$pkgver/hacking/tests/*.py
+  sed -e '/pycodestyle.BaseReport/i \        self.options.ignore_code = pycodestyle.StyleGuide.ignore_code' -i hacking-$pkgver/hacking/tests/*.py
+  sed -e '/pycodestyle.BaseReport/i \        self.options.physical_checks = []' -i hacking-$pkgver/hacking/tests/*.py
+  sed -e '/pycodestyle.BaseReport/i \        self.options.logical_checks = []' -i hacking-$pkgver/hacking/tests/*.py
+  sed -e '/pycodestyle.BaseReport/i \        self.options.ast_checks = []' -i hacking-$pkgver/hacking/tests/*.py
+  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