Commit a5c55fae authored by Roberto Oliveira's avatar Roberto Oliveira Committed by Ariadne Conill

testing/py-packaging: modernize APKBUILD

Changes in APKBUILD to make it complaint with python model
parent e8eee875
# 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"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment