Repository navigation
Expand file tree
/
Copy pathpython-lxml.avhb
More file actions
75 lines (64 loc) · 2.39 KB
/
Copy pathpython-lxml.avhb
File metadata and controls
75 lines (64 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Copyright 2010-2024 Avouch Authors
# Distributed under the terms of the GNU General Public License v2
# Maintainer: Qurban Ullah <[email protected]>
# Contributor: Qurban Ullah <[email protected]>
pkgbase=python-lxml
pkgname=('python-lxml' 'python-lxml-docs')
pkgver=5.3.0
pkgrel=1
pkgdesc="Python3 binding for the libxml2 and libxslt libraries"
arch=('x86_64')
groups=('dev-python')
license=('BSD' 'custom')
url="https://lxml.de/"
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'
'python-lxml-html-clean: enable htmlclean feature')
makedepends=('python-setuptools' 'python-pygments' 'python-sphinx' 'python-sphinx_rtd_theme'
'cython')
checkdepends=('python-cssselect' 'python-html5lib' 'python-beautifulsoup4')
source=("https://github.com/lxml/lxml/archive/lxml-$pkgver.tar.gz")
sha512sums=('514477bf4c865541233d73f20de816b51d265dbd75c56a0d13779e14527c73e85ca890718d06c08728da228d410459016e9cb8abdad4d03b44a81a04a198fb54')
prepare() {
mv lxml-lxml-$pkgver lxml-$pkgver
cd lxml-$pkgver
# Setting LC_CTYPE to workaround encoding issue
export LC_CTYPE=en_US.UTF-8
}
build() {
cd lxml-$pkgver
python setup.py build
make html
}
check() {
# TODO: Find a sane way to skip inplace build
cd lxml-$pkgver
# make PYTHON=python test
}
package_python-lxml() {
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_python-lxml-docs() {
pkgdesc="Python binding for the libxml2 and libxslt libraries (docs)"
depends=()
options=('docs')
cd lxml-$pkgver
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
}