aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-packaging/APKBUILD
diff options
context:
space:
mode:
authorRoberto Oliveira <robertoguimaraes8@gmail.com>2017-04-14 14:17:33 +0000
committerWilliam Pitcock <nenolod@dereferenced.org>2017-04-15 21:44:59 +0000
commita5c55fae732ea6706d0a60b15689f6affb11b050 (patch)
treef55888390870a534d367961c8bb0dd013fa25c54 /testing/py-packaging/APKBUILD
parente8eee875990fe96bcb7409b7deab20bc5da883b7 (diff)
testing/py-packaging: modernize APKBUILD
Changes in APKBUILD to make it complaint with python model
Diffstat (limited to 'testing/py-packaging/APKBUILD')
-rw-r--r--testing/py-packaging/APKBUILD26
1 files changed, 16 insertions, 10 deletions
diff --git a/testing/py-packaging/APKBUILD b/testing/py-packaging/APKBUILD
index 54884698b09..f48c5604196 100644
--- a/testing/py-packaging/APKBUILD
+++ b/testing/py-packaging/APKBUILD
@@ -1,15 +1,17 @@
# Maintainer: Breno Leitao <breno.leitao@gmail.com>
pkgname=py-packaging
+_pkgname=packaging
pkgver=16.8
-pkgrel=0
+pkgrel=1
pkgdesc="Core utilities for Python packages"
url="https://pypi.python.org/pypi/packaging"
-arch="all"
+arch="noarch"
license="APACHE or BSD"
+depends="py-parsing py-six"
subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
makedepends="python3-dev python2-dev py-setuptools"
-source="https://pypi.python.org/packages/c6/70/bb32913de251017e266c5114d0a645f262fb10ebc9bf6de894966d124e35/packaging-$pkgver.tar.gz"
-builddir="$srcdir/packaging-$pkgver"
+source="https://files.pythonhosted.org/packages/source/p/$_pkgname/$_pkgname-$pkgver.tar.gz"
+builddir="$srcdir/$_pkgname-$pkgver"
build() {
cd "$builddir"
@@ -17,27 +19,31 @@ build() {
python3 setup.py build || return 1
}
+package() {
+ mkdir -p "$pkgdir"
+}
+
+
_py2() {
replaces="$pkgname"
+ depends="${depends//py-/py2-}"
_py python2
}
_py3() {
+ depends="${depends//py-/py3-}"
_py python3
}
_py() {
local python="$1"
- local pyver="${1:6: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" || return 1
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
-package() {
- cd "$builddir"
- python setup.py install --prefix=/usr --root="$pkgdir" || return 1
-}
sha512sums="d1a7b65472c7c02dd758f0c469d6c6aeea34de7b798613f7fcdf45fcccbeba1e9085cab113fa89b392a60f758f8747d13b1c265c809566990c22e61ca8db49bb packaging-16.8.tar.gz"