Date: Saturday, June 23, 2018 @ 04:32:47 Author: felixonmars Revision: 327489
archrelease: copy trunk to testing-x86_64 Added: python-lxml/repos/testing-x86_64/ python-lxml/repos/testing-x86_64/PKGBUILD (from rev 327488, python-lxml/trunk/PKGBUILD) ----------+ PKGBUILD | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) Copied: python-lxml/repos/testing-x86_64/PKGBUILD (from rev 327488, python-lxml/trunk/PKGBUILD) =================================================================== --- testing-x86_64/PKGBUILD (rev 0) +++ testing-x86_64/PKGBUILD 2018-06-23 04:32:47 UTC (rev 327489) @@ -0,0 +1,98 @@ +# $Id$ +# Maintainer: Angel Velasquez <an...@archlinux.org> +# Maintainer: Felix Yan <felixonm...@archlinux.org> + +pkgbase=python-lxml +pkgname=('python-lxml' 'python2-lxml' 'python-lxml-docs') +pkgver=4.2.2 +pkgrel=1 +arch=('x86_64') +license=('BSD' 'custom') +url="http://lxml.de/" +makedepends=('libxslt' 'python-setuptools' 'python2-setuptools' 'epydoc' 'python2-pygments' + 'python2-docutils' 'cython' 'cython2') +checkdepends=('python-cssselect' 'python2-cssselect' 'python-html5lib' 'python2-html5lib' + 'python-beautifulsoup4' 'python2-beautifulsoup4') +source=("https://github.com/lxml/lxml/archive/lxml-$pkgver.tar.gz") +sha512sums=('167765e5f9ac7cf2f7814f0ff65ccbb4850ac44ca2bb3ff1e8a1894c6e9118d9f026c94a3db0b754f8af8614e6518432d7756beaea5c588150339e742f8e378f') + +prepare() { + mv lxml-lxml-$pkgver lxml-$pkgver + cp -a lxml-$pkgver{,-py2} + + # Setting LC_CTYPE to workaround encoding issue + export LC_CTYPE=en_US.UTF-8 +} + +build() { + cd "$srcdir"/lxml-$pkgver + python setup.py build + + cd "$srcdir"/lxml-$pkgver-py2 + python2 setup.py build + make PYTHON=python2 html +} + +check() { + # TODO: Find a sane way to skip inplace build + + cd "$srcdir"/lxml-$pkgver + make PYTHON=python test || warning "Tests failed" + + cd "$srcdir"/lxml-$pkgver-py2 + make PYTHON=python2 test || warning "Tests failed" +} + +package_python-lxml() { + pkgdesc="Python3 binding for the libxml2 and libxslt libraries" + depends=('python' 'libxslt') + optdepends=('python-beautifulsoup4: support for beautifulsoup parser to parse not well formed HTML' + 'python-cssselect: support for cssselect' + 'python-html5lib: support for html5lib parser' + 'python-lxml-docs: offline docs') + + cd lxml-$pkgver + python setup.py install --root="$pkgdir" --skip-build --optimize=1 + + install -Dm644 LICENSES.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -Dm644 doc/licenses/BSD.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/BSD.txt + install -Dm644 doc/licenses/elementtree.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/elementtree.txt +} + +package_python2-lxml() { + pkgdesc="Python2 binding for the libxml2 and libxslt libraries" + depends=('python2' 'libxslt') + optdepends=('python2-beautifulsoup4: support for beautifulsoup parser to parse not well formed HTML' + 'python2-cssselect: support for cssselect' + 'python2-html5lib: support for html5lib parser' + 'python-lxml-docs: offline docs') + + cd lxml-$pkgver-py2 + python2 setup.py install --root="$pkgdir" --skip-build --optimize=1 + + install -Dm644 LICENSES.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -Dm644 doc/licenses/BSD.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/BSD.txt + install -Dm644 doc/licenses/elementtree.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/elementtree.txt +} + +package_python-lxml-docs() { + pkgdesc="Python binding for the libxml2 and libxslt libraries (docs)" + options=('docs') + + cd lxml-$pkgver-py2 + install -d "$pkgdir"/usr/share/doc/$pkgbase + cp -r doc/html "$pkgdir"/usr/share/doc/$pkgbase + + install -Dm644 LICENSES.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -Dm644 doc/licenses/BSD.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/BSD.txt + install -Dm644 doc/licenses/elementtree.txt \ + "$pkgdir"/usr/share/licenses/$pkgname/elementtree.txt +}