diff options
author | Marian Buschsieweke <marian.buschsieweke@ovgu.de> | 2018-05-20 12:02:57 +0200 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2018-05-30 13:24:56 +0000 |
commit | bd307058bf361c8068c3d106740098afd13083a0 (patch) | |
tree | e963942d73b16db7e8cadcf776111e4338fa2005 | |
parent | 7eb917768a95b717e7c26c2f86d80d020c4fbdeb (diff) | |
download | aports-bd307058bf361c8068c3d106740098afd13083a0.tar.bz2 aports-bd307058bf361c8068c3d106740098afd13083a0.tar.xz |
testing/py-cycler: Build py2- and py3- versions as subpkgs
-rw-r--r-- | testing/py-cycler/APKBUILD | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/testing/py-cycler/APKBUILD b/testing/py-cycler/APKBUILD index ffa6c6e306..6c3d90eee5 100644 --- a/testing/py-cycler/APKBUILD +++ b/testing/py-cycler/APKBUILD @@ -3,27 +3,45 @@ pkgname=py-cycler _pkgname=cycler pkgver=0.10.0 -pkgrel=0 +pkgrel=1 pkgdesc="Composable style cycles in Python" url="http://matplotlib.org/cycler/" arch="noarch" license="BSD" -depends="python2" +depends="" depends_dev="" -makedepends="python2-dev py-setuptools" +makedepends="python2-dev python3-dev py-setuptools" install="" -subpackages="" +subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3" source="https://files.pythonhosted.org/packages/source/C/Cycler/$_pkgname-$pkgver.tar.gz" builddir="${srcdir}/${_pkgname}-$pkgver" build() { cd "$builddir" || return 1 python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { + mkdir -p "$pkgdir" +} + +_py2() { + replaces="$pkgname" + _py python2 +} + +_py3() { + _py python3 +} + +_py() { + local python="$1" + pkgdesc="$pkgdesc (for $python)" + depends="$depends $python" + cd "$builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + $python setup.py install --prefix=/usr --root="$subpkgdir" || return 1 } md5sums="4cb42917ac5007d1cdff6cccfe2d016b cycler-0.10.0.tar.gz" |