diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-07 16:11:53 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2016-11-08 17:14:31 +0100 |
commit | 2684666744448906c19f6833aeea1cee3ff81791 (patch) | |
tree | d33c77dcb18b8b1fcd2c62feb596624bbc613c60 /main/py-pbr | |
parent | 129c87d2ffa4d3aaa0b254bfe4125a6c1ba96364 (diff) | |
download | aports-2684666744448906c19f6833aeea1cee3ff81791.tar.bz2 aports-2684666744448906c19f6833aeea1cee3ff81791.tar.xz |
main/py-pbr: add py2/py3 subpackages
Diffstat (limited to 'main/py-pbr')
-rw-r--r-- | main/py-pbr/APKBUILD | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/main/py-pbr/APKBUILD b/main/py-pbr/APKBUILD index 92ff90f9ab..6908f56a46 100644 --- a/main/py-pbr/APKBUILD +++ b/main/py-pbr/APKBUILD @@ -7,24 +7,40 @@ pkgrel=0 pkgdesc="Python Build Reasonableness" url="https://pypi.python.org/pypi/pbr" arch="noarch" -license="APACHE2.0" -depends="python2" -depends_dev="" -makedepends="$depends_dev python2-dev py-setuptools" -install="" -subpackages="$pkgname-dev" +license="ASL 2.0" +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.tar.gz" - builddir="$srcdir/$_pkgname-$pkgver" build() { cd "$builddir" 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" + install_if="$pkgname=$pkgver-r$pkgrel $python" + cd "$builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + $python setup.py install --prefix=/usr --root="$subpkgdir" } md5sums="8e4968c587268f030e38329feb9c8f17 pbr-1.10.0.tar.gz" |