diff options
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" |