Files
haikuports/dev-python/packaging/packaging-25.0.recipe
2025-09-23 17:36:42 +02:00

61 lines
1.3 KiB
Bash

SUMMARY="Core utilities for Python packages"
DESCRIPTION="The 'packaging' project includes the following: \
version handling, specifiers, markers, requirements, tags, utilities."
HOMEPAGE="https://pypi.python.org/pypi/packaging"
COPYRIGHT="Donald Stufft and individual contributors"
LICENSE="BSD (2-clause)"
REVISION="1"
SOURCE_URI="https://pypi.io/packages/source/${portName:0:1}/$portName/$portName-$portVersion.tar.gz"
CHECKSUM_SHA256="d443872c98d677bf60f6a1f2f8c1cb748e8fe762d2bf9d3148b5599295b0fc4f"
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+="
flit_core_$pythonPackage
installer_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
$python -m flit_core.wheel
$python -m installer --prefix=$prefix dist/*.whl
packageEntries $pythonPackage \
$prefix/lib/python*
done
}