Skip to content

Commit 26886c5

Browse files
authored
Merge pull request #865 from macaroni-os/merge/mark-31/bump-dev-python_lxml-5_4_0
mark-devkit: [mark-31] Bump dev-python/lxml-5.4.0
2 parents 6bd1242 + 9afd46b commit 26886c5

2 files changed

Lines changed: 76 additions & 0 deletions

File tree

dev-python/lxml/Manifest

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
DIST lxml-5.3.2.tar.gz 3679948 BLAKE2B 82ba5564f8b53bb8acc84562b43b65e797b021377fc1df8c4eaa70d5746ab6003a9fde34bac4bc5a1891d0fba5687783b28e709472e097837f01801970568e5f SHA512 ff09abd870868a912e3c950bd14cdf30a4c8685296ceb37699fc8fa34fdeb1a1fb0daa98f84808af61f9b97cdfe56d3e4d8b5b3ff0ec7b1a24c7110ad1ec8cbc
2+
DIST lxml-5.4.0.tar.gz 3679479 BLAKE2B 130da36673a87b3bbbb7dd9aba63fb45f7c47118b5677d6c8974e570f95ad7fa914f18d820a96abc4bbc3bfa5875017c593ad489cd2f4a78da6ce9a30d21e078 SHA512 3d0bf222d5f213366a8b17d48702d3a5b430355d71b9ac88b4b1980e1a53fe34ba1d02c62053550f60f0320778647635d1af92c682b7f57ebf266521e9ee0d92

dev-python/lxml/lxml-5.4.0.ebuild

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Distributed under the terms of the GNU General Public License v2
2+
3+
EAPI=7
4+
5+
PYTHON_COMPAT=( python3+ pypy3 )
6+
7+
inherit distutils-r1 eutils toolchain-funcs
8+
9+
DESCRIPTION="A Pythonic binding for the libxml2 and libxslt libraries"
10+
HOMEPAGE="https://lxml.de/ https://pypi.org/project/lxml/ https://github.com/lxml/lxml"
11+
SRC_URI="https://files.pythonhosted.org/packages/76/3d/14e82fc7c8fb1b7761f7e748fd47e2ec8276d137b6acfe5a4bb73853e08f/lxml-5.4.0.tar.gz -> lxml-5.4.0.tar.gz"
12+
13+
LICENSE="BSD ElementTree GPL-2 PSF-2"
14+
SLOT="0"
15+
KEYWORDS="*"
16+
IUSE="doc examples +threads test"
17+
RESTRICT="!test? ( test )"
18+
19+
# Note: lib{xml2,xslt} are used as C libraries, not Python modules.
20+
RDEPEND="
21+
>=dev-libs/libxml2-2.9.5
22+
>=dev-libs/libxslt-1.1.28"
23+
DEPEND="${RDEPEND}"
24+
BDEPEND="
25+
virtual/pkgconfig
26+
dev-python/cython[${PYTHON_USEDEP}]
27+
dev-python/setuptools[${PYTHON_USEDEP}]
28+
test? ( dev-python/cssselect[${PYTHON_USEDEP}] )
29+
"
30+
31+
DISTUTILS_IN_SOURCE_BUILD=1
32+
33+
python_prepare_all() {
34+
# avoid replacing PYTHONPATH in tests.
35+
sed -i -e '/sys\.path/d' test.py || die
36+
37+
# don't use some random SDK on Darwin
38+
sed -i -e '/_ldflags =/s/=.*isysroot.*darwin.*None/= None/' \
39+
setupinfo.py || die
40+
41+
distutils-r1_python_prepare_all
42+
}
43+
44+
python_compile() {
45+
if ! python_is_python3; then
46+
local -x CFLAGS="${CFLAGS} -fno-strict-aliasing"
47+
fi
48+
tc-export PKG_CONFIG
49+
distutils-r1_python_compile
50+
}
51+
52+
python_test() {
53+
cp -r -l src/lxml/tests "${BUILD_DIR}"/lib/lxml/ || die
54+
cp -r -l src/lxml/html/tests "${BUILD_DIR}"/lib/lxml/html/ || die
55+
ln -s "${S}"/doc "${BUILD_DIR}"/ || die
56+
57+
"${EPYTHON}" test.py -vv --all-levels -p || die "Test ${test} fails with ${EPYTHON}"
58+
}
59+
60+
python_install_all() {
61+
if use doc; then
62+
local DOCS=( README.rst *.txt doc/*.txt )
63+
local HTML_DOCS=( doc/html/. )
64+
fi
65+
if use examples; then
66+
dodoc -r samples
67+
fi
68+
69+
distutils-r1_python_install_all
70+
}
71+
72+
pkg_postinst() {
73+
optfeature "Support for BeautifulSoup as a parser backend" dev-python/beautifulsoup
74+
optfeature "Translates CSS selectors to XPath 1.0 expressions" dev-python/cssselect
75+
}

0 commit comments

Comments
 (0)