blob: a6bd446f13c8b403e8a2ec92b33fc403b33006c0 (
plain)
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
|
# Maintainer: Patrick Northon <northon_patrick3@yahoo.ca>
pkgname=python2-lxml
pkgver=4.9.3
pkgrel=1
pkgdesc='Python2 binding for the libxml2 and libxslt libraries'
arch=('i686' 'x86_64' 'armv7h')
url='https://lxml.de/'
license=('BSD' 'custom')
depends=('python2' 'libxslt')
makedepends=('python2-setuptools' 'cython2')
optdepends=(
'python2-beautifulsoup4: malformed HTML parsing support'
'python2-cssselect: CSS parsing support'
'python2-html5lib: HTML5 parsing support'
)
source=("https://github.com/lxml/lxml/archive/lxml-$pkgver.tar.gz")
sha512sums=('74d40cbd02fc0329b789274b544af296edcb99e4c1a544dfbb7a90fdbe3e23b2621c5dfe7be3970f43c98cdd3d9bef9d5792c68db4648c2a12884b8104e1e1dc')
_dir="lxml-lxml-${pkgver}"
build() {
cd "${_dir}"
python2 setup.py build build_ext -i
#make PYTHON=python2
}
check() {
cd "${_dir}"
# need to use UTF-8 based locale; tests fail with e.g. LC_ALL=C
#make LC_ALL=C.UTF-8 PYTHON=python2 test_build
LC_ALL=C.UTF-8 python2 test.py -p -v
}
package() {
cd "${_dir}"
python2 setup.py install --root "${pkgdir}" --prefix=/usr --optimize=1 --skip-build
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"
}
|