[arch-commits] Commit in python-mox3/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Fri Oct 25 20:19:16 UTC 2019
Date: Friday, October 25, 2019 @ 20:19:15
Author: felixonmars
Revision: 519845
archrelease: copy trunk to community-staging-any
Added:
python-mox3/repos/community-staging-any/
python-mox3/repos/community-staging-any/PKGBUILD
(from rev 519842, python-mox3/trunk/PKGBUILD)
----------+
PKGBUILD | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 54 insertions(+)
Copied: python-mox3/repos/community-staging-any/PKGBUILD (from rev 519842, python-mox3/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2019-10-25 20:19:15 UTC (rev 519845)
@@ -0,0 +1,54 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-mox3
+pkgname=('python-mox3' 'python2-mox3')
+pkgver=0.28.0
+pkgrel=2
+arch=('any')
+pkgdesc='Mock object framework for Python'
+url='https://docs.openstack.org/developer/mox3'
+license=('Apache')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-pbr' 'python2-pbr'
+ 'python-fixtures' 'python2-fixtures')
+checkdepends=('python-oslotest' 'python2-oslotest')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack/mox3/archive/$pkgver.tar.gz")
+sha512sums=('abded0c36c8b1609d68d79c6c24616de534506178ff6ab1c93a23d67448973ee2515ced5fb0b6c73ff3f5cb72553dd75497356694eb6377c276fc2e1fc2c1cd3')
+
+prepare() {
+ # Python 3.6 fixes
+ sed -i 's/, flags=4//' mox3-$pkgver/mox3/tests/test_mox.py
+
+ cp -a mox3-$pkgver{,-py2}
+
+ export PBR_VERSION=$pkgver
+}
+
+build() {
+ cd "$srcdir"/mox3-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/mox3-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/mox3-$pkgver
+ stestr run
+
+ cd "$srcdir"/mox3-$pkgver-py2
+ PYTHON=python2 stestr2 run
+}
+
+package_python-mox3() {
+ depends=('python-pbr' 'python-fixtures')
+
+ cd mox3-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+}
+
+package_python2-mox3() {
+ depends=('python2-pbr' 'python2-fixtures')
+
+ cd mox3-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+}
More information about the arch-commits
mailing list