diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2016-08-30 21:29:05 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2016-08-30 23:35:39 +0200 |
commit | f58147375dd0d2e2c6cd6bd757838f40b4b504d7 (patch) | |
tree | 8b27c9b007965d9bb7ade44c97e162a79467fdf8 /main/py-lxml | |
parent | efb2b3853e885c0fa1398b5de165ca0c88fbb44d (diff) | |
download | aports-f58147375dd0d2e2c6cd6bd757838f40b4b504d7.tar.bz2 aports-f58147375dd0d2e2c6cd6bd757838f40b4b504d7.tar.xz |
main/py-lxml: add py2/py3 subpackages
Diffstat (limited to 'main/py-lxml')
-rw-r--r-- | main/py-lxml/APKBUILD | 38 |
1 files changed, 29 insertions, 9 deletions
diff --git a/main/py-lxml/APKBUILD b/main/py-lxml/APKBUILD index 89b9dca83d..d7f803f9e6 100644 --- a/main/py-lxml/APKBUILD +++ b/main/py-lxml/APKBUILD @@ -1,27 +1,47 @@ # Contributor: Francesco Colista <fcolista@alpinelinux.org> +# Contributor: Jakub Jirutka <jakub@jirutka.cz> # Maintainer: Francesco Colista <fcolista@alpinelinux.org> pkgname=py-lxml _pkgname=lxml pkgver=3.6.0 -pkgrel=0 +pkgrel=1 pkgdesc="Python LXML Library" url="http://lxml.de/" -arch="all" +arch="noarch" license="BSD" depends="" -makedepends="python-dev libxml2-dev libxslt-dev py-setuptools" -install="" +makedepends="python2-dev python3-dev libxml2-dev libxslt-dev py-setuptools" +subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3" source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +builddir="$srcdir/$_pkgname-$pkgver" -_builddir="$srcdir"/$_pkgname-$pkgver build() { - cd "$_builddir" - python setup.py build || return 1 + cd "$builddir" + python2 setup.py build || return 1 + python3 setup.py build } package() { - cd "$_builddir" - python 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)" + arch="all" + install_if="$pkgname=$pkgver-r$pkgrel $python" + + cd "$builddir" + $python setup.py install --prefix=/usr --root="$subpkgdir" } md5sums="5957cc384bd6e83934be35c057ec03b6 lxml-3.6.0.tar.gz" |