speg: new python recipe, version 0.3

This commit is contained in:
Joachim Mairböck
2025-04-21 21:29:20 +02:00
parent 683c23217e
commit 81da941c02

View File

@@ -0,0 +1,62 @@
SUMMARY="A PEG-based parser interpreter with memoization"
DESCRIPTION="A PEG-based parser interpreter with memoization (in time)."
HOMEPAGE="https://github.com/avakar/speg"
COPYRIGHT="2015-2017, Martin Vejnár"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://files.pythonhosted.org/packages/source/s/speg/speg-$portVersion.zip"
CHECKSUM_SHA256="10cbef47e168dfc62f14db575cf1c428037a2b881cee6c3cfceda0439c243e71"
ARCHITECTURES="any"
PROVIDES="
speg = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_VERSIONS=(3.10)
for pythonVersion in "${PYTHON_VERSIONS[@]}"; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_${pythonPackage}=\"
speg_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
$REQUIRES
cmd:python$pythonVersion
#six_$pythonPackage # not yet needed in this version
\""
BUILD_REQUIRES+="
build_$pythonPackage
installer_$pythonPackage
setuptools_$pythonPackage
wheel_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for pythonVersion in "${PYTHON_VERSIONS[@]}"; do
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
rm -f dist/*.whl
$python -m build --wheel --skip-dependency-check --no-isolation
$python -m installer --p $prefix dist/*.whl
packageEntries $pythonPackage \
$prefix/lib/python*
done
}