1 # Maintainer: Angel Velasquez <angvp@archlinux.org>
2 # Maintainer: Felix Yan <felixonmars@archlinux.org>
5 pkgname=('python-lxml' 'python-lxml-docs')
8 pkgdesc="Python3 binding for the libxml2 and libxslt libraries"
10 license=('BSD' 'custom')
11 url="https://lxml.de/"
12 depends=('python' 'libxslt')
13 optdepends=('python-beautifulsoup4: support for beautifulsoup parser to parse not well formed HTML'
14 'python-cssselect: support for cssselect'
15 'python-html5lib: support for html5lib parser'
16 'python-lxml-docs: offline docs')
17 makedepends=('python-setuptools' 'python-pygments' 'python-sphinx' 'python-sphinx_rtd_theme'
19 checkdepends=('python-cssselect' 'python-html5lib' 'python-beautifulsoup4')
20 source=("https://github.com/lxml/lxml/archive/lxml-$pkgver.tar.gz")
21 sha512sums=('f52d54908f92997f610638a9a3054cb73723ae81a5ad9e77918b0603ec7441b0e7d2143f8a8ac66c05cd6a0b3b298d348397b7e2df19f83c21e336514c47d910')
24 mv lxml-lxml-$pkgver lxml-$pkgver
26 # Setting LC_CTYPE to workaround encoding issue
27 export LC_CTYPE=en_US.UTF-8
37 # TODO: Find a sane way to skip inplace build
40 make PYTHON=python test
43 package_python-lxml() {
45 python setup.py install --root="$pkgdir" --skip-build --optimize=1
47 install -Dm644 LICENSES.txt \
48 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
49 install -Dm644 doc/licenses/BSD.txt \
50 "$pkgdir"/usr/share/licenses/$pkgname/BSD.txt
51 install -Dm644 doc/licenses/elementtree.txt \
52 "$pkgdir"/usr/share/licenses/$pkgname/elementtree.txt
55 package_python-lxml-docs() {
56 pkgdesc="Python binding for the libxml2 and libxslt libraries (docs)"
61 install -d "$pkgdir"/usr/share/doc/$pkgbase
62 cp -r doc/html "$pkgdir"/usr/share/doc/$pkgbase
64 install -Dm644 LICENSES.txt \
65 "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
66 install -Dm644 doc/licenses/BSD.txt \
67 "$pkgdir"/usr/share/licenses/$pkgname/BSD.txt
68 install -Dm644 doc/licenses/elementtree.txt \
69 "$pkgdir"/usr/share/licenses/$pkgname/elementtree.txt