[arch-commits] Commit in python-zope-deferredimport/trunk (PKGBUILD)
Felix Yan
felixonmars at archlinux.org
Fri Nov 9 15:10:11 UTC 2018
Date: Friday, November 9, 2018 @ 15:10:10
Author: felixonmars
Revision: 404363
upgpkg: python-zope-deferredimport 4.3-2
fix polluting py3 pyc files in py2 package
Modified:
python-zope-deferredimport/trunk/PKGBUILD
----------+
PKGBUILD | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-11-09 15:01:28 UTC (rev 404362)
+++ PKGBUILD 2018-11-09 15:10:10 UTC (rev 404363)
@@ -3,7 +3,7 @@
pkgbase=python-zope-deferredimport
pkgname=('python-zope-deferredimport' 'python2-zope-deferredimport')
pkgver=4.3
-pkgrel=1
+pkgrel=2
pkgdesc="Allows you to perform imports names that will only be resolved when used in the code"
arch=('any')
url="https://github.com/zopefoundation/zope.deferredimport"
@@ -13,16 +13,24 @@
source=("$pkgbase-$pkgver.tar.gz::https://github.com/zopefoundation/zope.deferredimport/archive/$pkgver.tar.gz")
sha512sums=('0b62cf6caa7709dbb6b0ae85bf9c5e24909c79af57da8e3d081e69ff9f73fc60fbe5a83cdfe795551eeee3c045d3783a09cb3e6eb3964a44e6fbbea149ca3f8a')
+prepare() {
+ # Build in separated dir to avoid polluting .pyc files
+ cp -a zope.deferredimport-$pkgver{,-py2}
+}
build() {
- cd zope.deferredimport-$pkgver
+ cd "$srcdir"/zope.deferredimport-$pkgver
python setup.py build
+
+ cd "$srcdir"/zope.deferredimport-$pkgver-py2
python2 setup.py build
}
check() {
- cd zope.deferredimport-$pkgver
+ cd "$srcdir"/zope.deferredimport-$pkgver
PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python -m zope.testrunner --test-path=src
+
+ cd "$srcdir"/zope.deferredimport-$pkgver-py2
PYTHONPATH="$PWD/build/lib:$PYTHONPATH" python2 -m zope.testrunner --test-path=src
}
@@ -36,7 +44,7 @@
package_python2-zope-deferredimport() {
depends=('python2-setuptools' 'python2-zope-proxy')
- cd zope.deferredimport-$pkgver
+ cd zope.deferredimport-$pkgver-py2
python2 setup.py install --root="$pkgdir" --optimize=1
}
More information about the arch-commits
mailing list