Files
haikuports/dev-python/regex/regex-2020.1.8.recipe
Oscar Lesta 56d3710e8e regex: drop Python 3.9 support.
Only on-tree user (calibre) targets 3.10 only already.
2025-09-19 22:53:14 -03:00

73 lines
1.6 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
SUMMARY="All things regular expression: implemented in python"
DESCRIPTION="This regex implementation is backwards-compatible with the \
standard re module, but offers additional functionality."
HOMEPAGE="https://pypi.org/project/regex/"
COPYRIGHT="2013-2020 Matthew Barnett"
LICENSE="MIT"
REVISION="7"
SOURCE_URI="https://pypi.org/packages/source/r/regex/regex-$portVersion.tar.gz"
CHECKSUM_SHA256="d0f424328f9822b0323b3b6f2e4b9c90960b24743d220763c7f07071e0778351"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
"
PYTHON_VERSIONS=(3.10)
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
if [ "$targetArchitecture" = x86_gcc2 ]; then
eval "PROVIDES_$pythonPackage+=\"
regex_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku$secondaryArchSuffix
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
done
}