void-packages/srcpkgs/python3-elementpath/template
2021-08-14 23:17:36 +07:00

38 lines
1.1 KiB
Bash

# Template file for 'python3-elementpath'
pkgname=python3-elementpath
version=2.2.3
revision=1
wrksrc=elementpath-${version}
build_style=python3-module
hostmakedepends="python3-setuptools"
depends="python3"
checkdepends="python3-lxml"
short_desc="XPath 1.0/2.0 parsers and selectors for ElementTree and lxml"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="MIT"
homepage="https://github.com/sissaschool/elementpath"
distfiles="${PYPI_SITE}/e/elementpath/elementpath-${version}.tar.gz"
checksum=60139b91ef9646e27381fd62b8c38f1fc8ebc78dc4bc231c08c51240062e58e6
post_patch() {
# depends on xmlschema and memory_profiling
rm -f tests/memory_profiling.py tests/execute_w3c_tests.py
# unparsed text is broken
vsed -i '
/def test_unparsed_text_function/,/^ *def /{
/def test_unparse/d
/^ *def /!d
}
' tests/test_xpath3.py
# locale handling in musl is NOT that ideal,
# those tests are broken on musl
if [ "$XBPS_TARGET_LIBC" = musl ]; then
vsed -i tests/test_xpath2_functions.py \
-e "/compare.*Strassen.* 1/d" \
-e "/with self\.assertRaises(locale\.Error)/,+3d"
fi
}
post_install() {
vlicense LICENSE
}