Date: Friday, May 11, 2018 @ 08:26:52 Author: felixonmars Revision: 320629
archrelease: copy trunk to community-any Added: python-hacking/repos/community-any/PKGBUILD (from rev 320628, python-hacking/trunk/PKGBUILD) Deleted: python-hacking/repos/community-any/PKGBUILD ----------+ PKGBUILD | 113 ++++++++++++++++++++++++++++--------------------------------- 1 file changed, 53 insertions(+), 60 deletions(-) Deleted: PKGBUILD =================================================================== --- PKGBUILD 2018-05-11 08:26:24 UTC (rev 320628) +++ PKGBUILD 2018-05-11 08:26:52 UTC (rev 320629) @@ -1,60 +0,0 @@ -# $Id$ -# Maintainer: Felix Yan <felixonm...@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 -} Copied: python-hacking/repos/community-any/PKGBUILD (from rev 320628, python-hacking/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2018-05-11 08:26:52 UTC (rev 320629) @@ -0,0 +1,53 @@ +# $Id$ +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +pkgbase=python-hacking +pkgname=('python-hacking' 'python2-hacking') +pkgver=1.1.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=('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 +}