Date: Friday, April 7, 2023 @ 05:09:10
Author: felixonmars
Revision: 1440586
archrelease: copy trunk to community-staging-any
Added:
python-hacking/repos/community-staging-any/
python-hacking/repos/community-staging-any/PKGBUILD
(from rev 1440585, python-hacking/trunk/PKGBUILD)
----------+
PKGBUILD | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
Copied: python-hacking/repos/community-staging-any/PKGBUILD (from rev 1440585,
python-hacking/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2023-04-07 05:09:10 UTC (rev 1440586)
@@ -0,0 +1,37 @@
+# Maintainer: Felix Yan <[email protected]>
+
+pkgname=python-hacking
+pkgver=5.0.0
+pkgrel=2
+arch=('any')
+pkgdesc='OpenStack Hacking Guideline Enforcement'
+url='https://docs.openstack.org/developer/hacking'
+license=('Apache')
+depends=('flake8')
+makedepends=('python-pbr' 'python-setuptools')
+checkdepends=('python-ddt' 'python-oslotest')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/openstack/hacking/archive/$pkgver.tar.gz")
+sha512sums=('d698a2643d26e867b0eda47f4bd1c80be878a0ba2ef74595a38237ff3c49112bca541956b751291b6f691234eacf26c58dea151aaf40ab10cc70446a93f85fc6')
+
+export PBR_VERSION=$pkgver
+
+prepare() {
+ cd hacking-$pkgver
+ sed -i 's/~=/>=/' requirements.txt
+}
+
+build() {
+ cd hacking-$pkgver
+ python setup.py build
+}
+
+check() {
+ cd hacking-$pkgver
+ # Our flake8 is too new
+ stestr run || echo "Tests failed"
+}
+
+package_python-hacking() {
+ cd hacking-$pkgver
+ python setup.py install --root "$pkgdir" --optimize=1
+}