Files
haikuports/dev-python/lxml/lxml-4.9.1.recipe
2022-09-13 14:31:43 +02:00

89 lines
2.5 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="fe749b052bb7233fe5d072fcb549221a8cb1a16725c47c37e42b0b9cb3ff2c3f"
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_PACKAGES+=(python3 python38 python39 python310)
PYTHON_VERSIONS+=(3.7 3.8 3.9 3.10)
PYTHON_LIBSUFFIXES+=(m '' '')
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonLibSuffix=${PYTHON_LIBSUFFIXES[$i]}
eval "PROVIDES_${pythonPackage}=\"\
${portName}_$pythonPackage = $portVersion\
\"; \
REQUIRES_$pythonPackage=\"\
haiku$secondaryArchSuffix\n\
cmd:python$pythonVersion\n\
lib:libpython$pythonVersion$pythonLibSuffix$secondaryArchSuffix\n\
lib:libxml2$secondaryArchSuffix\n\
lib:libxslt$secondaryArchSuffix\n\
lib:libz$secondaryArchSuffix\
\""
BUILD_REQUIRES+="$BUILD_REQUIRES
setuptools_$pythonPackage"
BUILD_PREREQUIRES+="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
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
}