diff options
author | prspkt <prspkt@protonmail.com> | 2018-07-17 07:10:14 +0300 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-07-18 16:54:41 +0000 |
commit | 2e441dc9cf52fca9099212eb5bec5fce502ebe60 (patch) | |
tree | 54a5cc181c8a850c39754ef7c2450b0716596b19 | |
parent | 766c86c9b73b398e6dabdf021aec67fe5ac7da83 (diff) | |
download | aports-2e441dc9cf52fca9099212eb5bec5fce502ebe60.tar.bz2 aports-2e441dc9cf52fca9099212eb5bec5fce502ebe60.tar.xz |
testing/py-pyrss2gen: add python3
-rw-r--r-- | testing/py-pyrss2gen/APKBUILD | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/testing/py-pyrss2gen/APKBUILD b/testing/py-pyrss2gen/APKBUILD index 97352bf0e3..1e81c152aa 100644 --- a/testing/py-pyrss2gen/APKBUILD +++ b/testing/py-pyrss2gen/APKBUILD @@ -8,11 +8,11 @@ pkgdesc="A generator for RSS2 using a Python data structure" url="http://dalkescientific.com/Python/PyRSS2Gen.html" arch="noarch" license="BSD" -depends="python2" +depends="" depends_dev="" -makedepends="python2-dev py-setuptools" +makedepends="py-setuptools python2-dev python3-dev" install="" -subpackages="" +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 @@ -29,11 +29,30 @@ prepare() { build() { cd "$_builddir" python2 setup.py build || return 1 + python3 setup.py build } 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="3529f831c6a4ed717b55315974e16317 PyRSS2Gen-1.1.tar.gz" |