summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--abs/core/python_modules/python-decorator/PKGBUILD53
-rw-r--r--abs/core/python_modules/python-decorator/__changelog0
2 files changed, 41 insertions, 12 deletions
diff --git a/abs/core/python_modules/python-decorator/PKGBUILD b/abs/core/python_modules/python-decorator/PKGBUILD
index 5b9d85f..eb51ec6 100644
--- a/abs/core/python_modules/python-decorator/PKGBUILD
+++ b/abs/core/python_modules/python-decorator/PKGBUILD
@@ -1,30 +1,59 @@
+# $Id$
# Maintainer: Thomas Dziedzic < gostrc at gmail >
# Contributor: Pierre Chapuis <catwell at archlinux dot us>
-pkgname=python-decorator
-pkgver=3.3.2
+pkgname=('python-decorator' 'python2-decorator')
+pkgver=4.2.1
pkgrel=1
pkgdesc='Python Decorator module'
arch=('any')
url='http://pypi.python.org/pypi/decorator'
license=('BSD')
-depends=('python2')
-source=("http://pypi.python.org/packages/source/d/decorator/decorator-${pkgver}.tar.gz"
+makedepends=('python2' 'python' 'python-setuptools' 'python2-setuptools')
+source=('https://pypi.python.org/packages/70/f1/cb9373195639db13063f55eb06116310ad691e1fd125e6af057734dc44ea/decorator-4.2.1.tar.gz'
'LICENSE.txt')
+md5sums=('e886337e9f70e70d45d67266b8e66044'
+ '0ca76d2c707f09dbb04acc425ea1a08b')
build() {
- cd decorator-${pkgver}
+ # Make python and python2 builds possible
+ cp -r decorator-$pkgver decorator2-$pkgver
+
+ cd "$srcdir/decorator-$pkgver"
+
+ python3 setup.py build
+
+ cd "$srcdir/decorator2-$pkgver"
python2 setup.py build
}
-package() {
- cd decorator-${pkgver}
+package_python2-decorator() {
+depends=('python2')
+replaces=('python-decorator<=3.3.2-1')
+ cd "${srcdir}/decorator2-${pkgver}"
- python2 setup.py install --root=${pkgdir} --optimize=1
+ python2 setup.py install --root="${pkgdir}" --optimize=1
- install -D -m644 ${srcdir}/LICENSE.txt \
- ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
+ install -D -m644 "${srcdir}/LICENSE.txt" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+package_python-decorator() {
+depends=('python')
+ cd "${srcdir}/decorator-${pkgver}"
+
+ python3 setup.py install --root="${pkgdir}" --optimize=1
+
+ install -D -m644 "${srcdir}/LICENSE.txt" \
+ "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+check() {
+ cd "$srcdir/decorator-$pkgver"
+
+ python3 setup.py test
+
+ cd "$srcdir/decorator2-$pkgver"
+
+ python2 setup.py test
}
-md5sums=('446f5165af67eb0fcd8fd28abd259e86'
- '0ca76d2c707f09dbb04acc425ea1a08b')
diff --git a/abs/core/python_modules/python-decorator/__changelog b/abs/core/python_modules/python-decorator/__changelog
deleted file mode 100644
index e69de29..0000000
--- a/abs/core/python_modules/python-decorator/__changelog
+++ /dev/null