sbcl rebuild
[arch-packages.git] / python-lxml / trunk / PKGBUILD
blobb2af58a394e903038310f6e55c6d96ca70765145
1 # Maintainer: Angel Velasquez <angvp@archlinux.org>
2 # Maintainer: Felix Yan <felixonmars@archlinux.org>
4 pkgbase=python-lxml
5 pkgname=('python-lxml' 'python-lxml-docs')
6 pkgver=4.9.1
7 pkgrel=1
8 pkgdesc="Python3 binding for the libxml2 and libxslt libraries"
9 arch=('x86_64')
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'
18              'cython')
19 checkdepends=('python-cssselect' 'python-html5lib' 'python-beautifulsoup4')
20 source=("https://github.com/lxml/lxml/archive/lxml-$pkgver.tar.gz")
21 sha512sums=('f52d54908f92997f610638a9a3054cb73723ae81a5ad9e77918b0603ec7441b0e7d2143f8a8ac66c05cd6a0b3b298d348397b7e2df19f83c21e336514c47d910')
23 prepare() {
24   mv lxml-lxml-$pkgver lxml-$pkgver
26   # Setting LC_CTYPE to workaround encoding issue
27   export LC_CTYPE=en_US.UTF-8
30 build() {
31   cd lxml-$pkgver
32   python setup.py build
33   make html
36 check() {
37   # TODO: Find a sane way to skip inplace build
39   cd lxml-$pkgver
40   make PYTHON=python test
43 package_python-lxml() {
44   cd lxml-$pkgver
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)"
57   depends=()
58   options=('docs')
60   cd lxml-$pkgver
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