aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-natsort/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/py-natsort/APKBUILD')
-rw-r--r--testing/py-natsort/APKBUILD52
1 files changed, 29 insertions, 23 deletions
diff --git a/testing/py-natsort/APKBUILD b/testing/py-natsort/APKBUILD
index c7d20ec913..31362e3a21 100644
--- a/testing/py-natsort/APKBUILD
+++ b/testing/py-natsort/APKBUILD
@@ -2,40 +2,46 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-natsort
_pkgname=natsort
-pkgver=4.0.4
+pkgver=5.0.1
pkgrel=0
pkgdesc="A module for natural sorting"
url="https://github.com/SethMMorton/natsort"
arch="noarch"
license="MIT"
-depends="python2"
-depends_dev=""
-makedepends="python2-dev py-setuptools"
-install=""
-subpackages=""
+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"
+ 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="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
-md5sums="03c9562e852672172bfe4b1a00e02d11 natsort-4.0.4.tar.gz"
-sha256sums="c76ba3e85fba78f276ac06e4d47f2230d1070f9c19413b2a0bfe7de6af311839 natsort-4.0.4.tar.gz"
-sha512sums="e1c00de6fec56aeda6dedb547edfb2f819d8c129feb938be9cee64cd106485d75b2af12316d73b6e79c90694b0d489ddbdc29635e3df9569466d062cabbed461 natsort-4.0.4.tar.gz"
+md5sums="e82b8f60b07c6906c2983c40790c6f46 natsort-5.0.1.tar.gz"
+sha256sums="4ad6b4d1153451e345967989bd3ca30abf33f615b116eeadfcc51a456e6974a9 natsort-5.0.1.tar.gz"
+sha512sums="a183558b8a4be6300400b2efed901fb515efce4bb340b3bdda723f6a628aa05ad2f9e1f2c696afa3970e0c82aca47ea597985a1c6c971517ee3bf759f25241bd natsort-5.0.1.tar.gz"