From 02a26d3bf130237bb9fc640cc907df7862eeaeea Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Sun, 9 Jun 2019 17:28:16 +0000 Subject: python-zope-deferredimport: initial inclusion --- .../python-zope-deferredimport/PKGBUILD | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 abs/core/python_modules/python-zope-deferredimport/PKGBUILD diff --git a/abs/core/python_modules/python-zope-deferredimport/PKGBUILD b/abs/core/python_modules/python-zope-deferredimport/PKGBUILD new file mode 100644 index 0000000..072d35f --- /dev/null +++ b/abs/core/python_modules/python-zope-deferredimport/PKGBUILD @@ -0,0 +1,51 @@ +# Maintainer: Felix Yan + +pkgbase=python-zope-deferredimport +pkgname=('python-zope-deferredimport' 'python2-zope-deferredimport') +pkgver=4.3 +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" +license=('ZPL') +makedepends=('python-setuptools' 'python2-setuptools' 'python-zope-proxy' 'python2-zope-proxy') +checkdepends=('python-zope-testrunner' 'python2-zope-testrunner') +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 "$srcdir"/zope.deferredimport-$pkgver + python setup.py build + + cd "$srcdir"/zope.deferredimport-$pkgver-py2 + python2 setup.py build +} + +check() { + 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 +} + +package_python-zope-deferredimport() { + depends=('python-setuptools' 'python-zope-proxy') + + cd zope.deferredimport-$pkgver + python setup.py install --root="$pkgdir" --optimize=1 +} + +package_python2-zope-deferredimport() { + depends=('python2-setuptools' 'python2-zope-proxy') + + cd zope.deferredimport-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --optimize=1 +} + +# vim:set ts=2 sw=2 et: -- cgit v0.12