# Contributor: Francesco Colista # Contributor: Jakub Jirutka # Maintainer: Francesco Colista pkgname=py-lxml _pkgname=lxml pkgver=4.4.1 pkgrel=1 pkgdesc="Python LXML Library" url="https://lxml.de/" arch="all" license="BSD-3-Clause AND ZPL-2.0 AND ElementTree" 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" build() { cd "$builddir" python2 setup.py build python3 setup.py build } check() { cd "$builddir" python2 setup.py check python3 setup.py check } package() { mkdir -p "$pkgdir" } _py2() { replaces="$pkgname" _py python2 } _py3() { _py python3 } _py() { local python="$1" pkgdesc="$pkgdesc (for $python)" install_if="$pkgname=$pkgver-r$pkgrel $python" cd "$builddir" $python setup.py install --prefix=/usr --root="$subpkgdir" } sha512sums="3f11469290868f5bd30631020ac170c40da7348853609edf6fc6b00437b053fd774e0dfc6e711703ac5d05398dfa1f31e59a185935c3dc8ef0e1914a518bd049 lxml-4.4.1.tar.gz"