Files
haikuports/dev-python/pyparsing/pyparsing-3.1.2.recipe
Oscar Lesta 411cb76ddd pyparsing: drop Python 3.9 support.
All on-tree users (matplotlib, spice) are 3.10 only already.
2025-09-19 22:53:14 -03:00

69 lines
1.6 KiB
Bash

SUMMARY="A python parsing module"
DESCRIPTION="The pyparsing module is an alternative approach to creating and \
executing simple grammars, vs. the traditional lex/yacc approach, or the \
use of regular expressions. The pyparsing module provides a library of \
classes that client code uses to construct the grammar directly in \
Python code."
HOMEPAGE="https://pypi.python.org/pypi/pyparsing"
COPYRIGHT="2003-2022 Paul T. McGuire"
LICENSE="MIT"
REVISION="2"
SOURCE_URI="https://github.com/pyparsing/pyparsing/archive/pyparsing_$portVersion.tar.gz"
CHECKSUM_SHA256="9655507e4583fa20d2b6909ce4bf7fee71a9976ea94c734dd857fa9ae7c9c7dd"
SOURCE_DIR="pyparsing-pyparsing_$portVersion"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_VERSIONS=(3.10)
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
build_$pythonPackage
flit_core_$pythonPackage
installer_$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 -m build --wheel --no-isolation
$python -m installer -p $prefix dist/*.whl
packageEntries $pythonPackage \
$prefix/lib/python*
done
}