[arch-commits] Commit in python-mox3/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Thu Jul 12 20:26:53 UTC 2018
Date: Thursday, July 12, 2018 @ 20:26:53
Author: felixonmars
Revision: 358175
archrelease: copy trunk to community-staging-any
Added:
python-mox3/repos/community-staging-any/
python-mox3/repos/community-staging-any/PKGBUILD
(from rev 358174, python-mox3/trunk/PKGBUILD)
----------+
PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
Copied: python-mox3/repos/community-staging-any/PKGBUILD (from rev 358174, python-mox3/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2018-07-12 20:26:53 UTC (rev 358175)
@@ -0,0 +1,55 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-mox3
+pkgname=('python-mox3' 'python2-mox3')
+pkgver=0.25.0
+pkgrel=2
+arch=('any')
+pkgdesc='Mock object framework for Python'
+url='http://docs.openstack.org/developer/mox3'
+license=('Apache')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-pbr' 'python2-pbr'
+ 'python-fixtures' 'python2-fixtures')
+checkdepends=('python-testrepository' 'python2-testrepository')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack/mox3/archive/$pkgver.tar.gz")
+sha512sums=('deff22f869b5b5d326086449985265360c10b9be0593b3abd3adb336ec821e8ea38686be9874b080e6da0b9ee7444b170309d344391617a51aa1657039a4dace')
+
+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
+ python setup.py testr
+
+ cd "$srcdir"/mox3-$pkgver-py2
+ PYTHON=python2 python2 setup.py testr
+}
+
+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