mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
71 lines
1.7 KiB
Bash
71 lines
1.7 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="1"
|
|
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_PACKAGES=(python39 python310)
|
|
PYTHON_VERSIONS=(3.9 3.10)
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
pythonPackage=${PYTHON_PACKAGES[i]}
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
|
|
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 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:$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
|
|
}
|