aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2016-11-29 22:35:13 +0000
committerTimo Teräs <timo.teras@iki.fi>2016-12-27 09:44:30 +0200
commit0ced851a61df2404fda381a1ea8e53ae07a56846 (patch)
tree5a67519bb7e92aaf03c09444c2b1c9b2f885bd40
parent02597b69211fa64e98a8c57d5002385ab4b5756d (diff)
downloadaports-0ced851a61df2404fda381a1ea8e53ae07a56846.tar.bz2
aports-0ced851a61df2404fda381a1ea8e53ae07a56846.tar.xz
testing/py-stdnum: upgrade to 1.5 and enable py3
-rw-r--r--testing/py-stdnum/APKBUILD54
1 files changed, 30 insertions, 24 deletions
diff --git a/testing/py-stdnum/APKBUILD b/testing/py-stdnum/APKBUILD
index a9b850c3a0..72b4527985 100644
--- a/testing/py-stdnum/APKBUILD
+++ b/testing/py-stdnum/APKBUILD
@@ -2,40 +2,46 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-stdnum
_pkgname=python-stdnum
-pkgver=0.8.1
+pkgver=1.5
pkgrel=0
pkgdesc="A Python module to handle standardized numbers and codes"
url="http://arthurdejong.org/python-stdnum/"
arch="noarch"
license="LGPL2+"
-depends="python2"
-depends_dev=""
-makedepends="python2-dev py-setuptools"
-install=""
-subpackages=""
-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
-}
+makedepends="python2-dev py-setuptools python3-dev"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="https://arthurdejong.org/python-stdnum/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
build() {
- cd "$_builddir"
+ cd "$builddir"
python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
- cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ _py python2
+}
+
+_py3() {
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
-md5sums="fd2d8f12055d4a133fe480ec7f20fa94 python-stdnum-0.8.1.tar.gz"
-sha256sums="41bac7de44ac84bc23325070e931e187fb00bfb6b93e0f4fbecc8736bd31b1d2 python-stdnum-0.8.1.tar.gz"
-sha512sums="c3aa3179b6c27ca88ad8a39c086f8305d3406f79e29ea06656c1a5caf2c78a0fac4fa04bb663bb83f2c8e105cf156e9e421854b9b4c16b2cc18825c4f0ae1028 python-stdnum-0.8.1.tar.gz"
+md5sums="a54bbfe0b3029f1a35cb3819e5de88e1 python-stdnum-1.5.tar.gz"
+sha256sums="10fe3db303aec532057484668ca9a4f421c2e5b3b1caee670b26b047bcbc737e python-stdnum-1.5.tar.gz"
+sha512sums="8d6394d7039fc5a2e3785eb95ef1793038ae75443224fc5af7f1cae2cb575c2f4e5451bd9668304ba95d3ee3f87dc0103ccf6c35837220f9729cbe1a3e13f656 python-stdnum-1.5.tar.gz"