diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-07 20:29:46 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-08 17:27:46 +0100 |
commit | 7202ca0458afe3ce0115d03f3abc2957c6534225 (patch) | |
tree | f3300c90d88af3673aae0ae5954462b803b26fe6 /main/py-roman | |
parent | 92c8d994fb05bf58c3f299c9a34b122ca32211da (diff) | |
download | aports-7202ca0458afe3ce0115d03f3abc2957c6534225.tar.bz2 aports-7202ca0458afe3ce0115d03f3abc2957c6534225.tar.xz |
main/py-roman: add py2/py3 subpackages
Diffstat (limited to 'main/py-roman')
-rw-r--r-- | main/py-roman/APKBUILD | 41 |
1 files changed, 27 insertions, 14 deletions
diff --git a/main/py-roman/APKBUILD b/main/py-roman/APKBUILD index f57d792114..b5ce36d02f 100644 --- a/main/py-roman/APKBUILD +++ b/main/py-roman/APKBUILD @@ -3,31 +3,44 @@ pkgname=py-roman _pkgname=roman pkgver=2.0.0 -pkgrel=0 +pkgrel=1 pkgdesc="Integer to Roman numerals converter" url="http://pypi.python.org/pypi/roman" arch="noarch" license="Python" -depends="python2" -makedepends="python2-dev py-setuptools" -install="" -subpackages="" +depends="" +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.zip" - -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - cd "$_builddir" - # apply patches here -} +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 --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="aa71d131eec16d45c030fd06a27c9d17 roman-2.0.0.zip" |