aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-dateutil
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2016-09-18 18:34:47 +0200
committerJakub Jirutka <jakub@jirutka.cz>2016-09-18 18:35:27 +0200
commit5c68640dd92b404467ee60f56c289ae2d1178d9e (patch)
tree24e0d1d10b087bc06bb306df5533a68a8ffbe0e7 /main/py-dateutil
parent8e5194760e84a8e76ecd8557e0800b1217e12a4c (diff)
downloadaports-5c68640dd92b404467ee60f56c289ae2d1178d9e.tar.bz2
aports-5c68640dd92b404467ee60f56c289ae2d1178d9e.tar.xz
main/py-dateutil: update to 2.5.3 and add py2/py3 subpackages
Diffstat (limited to 'main/py-dateutil')
-rw-r--r--main/py-dateutil/APKBUILD58
1 files changed, 34 insertions, 24 deletions
diff --git a/main/py-dateutil/APKBUILD b/main/py-dateutil/APKBUILD
index 08615f6312..90e83dcb12 100644
--- a/main/py-dateutil/APKBUILD
+++ b/main/py-dateutil/APKBUILD
@@ -2,40 +2,50 @@
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=py-dateutil
_pkgname=python-dateutil
-pkgver=2.5.1
+pkgver=2.5.3
pkgrel=0
pkgdesc="Python extensions for datetime module"
url="http://labix.org/python-dateutil"
arch="noarch"
license="BSD"
-depends="python py-six"
-depends_dev=""
-makedepends="python-dev py-setuptools"
-install=""
-subpackages=""
+depends=""
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
-
-_builddir="$srcdir"/$_pkgname-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+builddir="$srcdir/$_pkgname-$pkgver"
build() {
- cd "$_builddir"
- python setup.py build || return 1
+ cd "$builddir"
+
+ python2 setup.py build || return 1
+ python3 setup.py build
}
package() {
- cd "$_builddir"
- python setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ depends="py2-six"
+ _py python2
+}
+
+_py3() {
+ depends="py3-six"
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
-md5sums="2769f13c596427558136b34977a95269 python-dateutil-2.5.1.tar.gz"
-sha256sums="40d1bc468c7df50aff9e7a12c14687f9180efcff86900ee2963f9f2c13b5d7a9 python-dateutil-2.5.1.tar.gz"
-sha512sums="197cabe90406c77436f895ae90137674ff4a751bb71af11c7045643a27c83c97dbe783895b9ab90250a02c9ff11292d9f3763d649914d8a857d5c7a46a04f3c6 python-dateutil-2.5.1.tar.gz"
+md5sums="05ffc6d2cc85a7fd93bb245807f715ef python-dateutil-2.5.3.tar.gz"
+sha256sums="1408fdb07c6a1fa9997567ce3fcee6a337b39a503d80699e0f213de4aa4b32ed python-dateutil-2.5.3.tar.gz"
+sha512sums="413b935321f0a65fd8e8ba49990acd5bed60b9bcd614837a26c1cf52ecbf268543a97791dfa7b91ebf183866a8de7be302ca7d18d10352e897994f60bce5df62 python-dateutil-2.5.3.tar.gz"