mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
Fix crash on "import lxml.etree" related to calling xmlInitParser() too late. See: https://github.com/lxml/lxml/pull/370
114 lines
2.6 KiB
Bash
114 lines
2.6 KiB
Bash
SUMMARY="A Pythonic binding for the libxml2 and libxslt libraries"
|
|
DESCRIPTION="The lxml XML toolkit is unique in that it combines the speed \
|
|
and XML feature completeness of the libxml2 and libxslt libraries with the \
|
|
simplicity of a native Python API, mostly compatible but superior to the \
|
|
well-known ElementTree API."
|
|
HOMEPAGE="https://lxml.de/
|
|
https://github.com/lxml/lxml
|
|
https://pypi.python.org/pypi/lxml/"
|
|
COPYRIGHT="2003-2010 Gustavo Niemeyer
|
|
2003 Shuttleworth Foundation
|
|
2004 Infrae"
|
|
LICENSE="BSD (3-clause)
|
|
ElementTree
|
|
GNU GPL v2
|
|
PSF-2"
|
|
REVISION="1"
|
|
SOURCE_URI="https://github.com/lxml/lxml/releases/download/lxml-$portVersion/lxml-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="4e109ca30d1edec1ac60cdbe341905dc3b8f55b16855e03a54aaf59e51ec8c6f"
|
|
SOURCE_DIR="lxml-$portVersion"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
devel:libxml2$secondaryArchSuffix
|
|
devel:libxslt$secondaryArchSuffix
|
|
devel:libz$secondaryArchSuffix
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc$secondaryArchSuffix
|
|
cmd:ld$secondaryArchSuffix
|
|
"
|
|
|
|
PYTHON_VERSIONS=(3.9 3.10)
|
|
|
|
for i in "${!PYTHON_VERSIONS[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
eval "PROVIDES_${pythonPackage}=\"
|
|
${portName}_$pythonPackage = $portVersion
|
|
\""
|
|
|
|
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
|
eval "PROVIDES_${pythonPackage}+=\"
|
|
lxml_$pythonPackage = $portVersion
|
|
\""
|
|
fi
|
|
|
|
eval "REQUIRES_$pythonPackage=\"
|
|
haiku$secondaryArchSuffix
|
|
cmd:python$pythonVersion
|
|
lib:libpython$pythonVersion$secondaryArchSuffix
|
|
lib:libxml2$secondaryArchSuffix
|
|
lib:libxslt$secondaryArchSuffix
|
|
lib:libz$secondaryArchSuffix
|
|
\""
|
|
|
|
BUILD_REQUIRES+="
|
|
setuptools_$pythonPackage
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
TEST_REQUIRES="
|
|
cmd:make
|
|
cmd:python3
|
|
"
|
|
|
|
INSTALL()
|
|
{
|
|
for i in "${!PYTHON_VERSIONS[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python$pythonVersion
|
|
installLocation=$prefix/lib/$python/vendor-packages/
|
|
export PYTHONPATH=$installLocation
|
|
|
|
mkdir -p "$installLocation"
|
|
rm -rf build
|
|
|
|
$python setup.py build install \
|
|
--root=/ --prefix="$prefix" --without-cython
|
|
|
|
packageEntries $pythonPackage \
|
|
"$prefix"/lib/$python
|
|
done
|
|
|
|
if [ -z "$secondaryArchSuffix" ]; then
|
|
install -m 755 -d "$docDir"
|
|
install -m 644 -t "$docDir" CHANGES.txt CREDITS.txt README.rst
|
|
fi
|
|
}
|
|
|
|
|
|
# For reference, on beta4, 32 bits, with Python 3.10:
|
|
#Ran 1965 tests in 74.267s
|
|
#FAILED (failures=2, errors=2)
|
|
TEST()
|
|
{
|
|
make test3
|
|
}
|