Files
haikuports/dev-python/packaging/packaging-23.0.recipe
OscarL 70ac5cadda python3.8: bulk removal of now obsolete "_python38" packages. (#9328)
* python3.8: bulk removal of now obsolete "_python38" packages.

Done via scripting. No functional change intended or expected.

Some manual tweaks will follow.

* python3.8: further manual tweaks after bulk-3.8-removal.

Unlike the previous commit with automated changes,
I've tested builds for *these* recipes in beta4 64 bits.
2023-09-01 18:19:50 +00:00

58 lines
1.4 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="2014-2021 Donald Stufft and individual contributors"
LICENSE="Apache v2"
REVISION="2"
SOURCE_URI="https://pypi.io/packages/source/${portName:0:1}/$portName/$portName-$portVersion.tar.gz"
CHECKSUM_SHA256="b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"
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\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\n\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
build_$pythonPackage
flit_core_$pythonPackage
installer_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
$python -m build -wn
$python -m installer --prefix=$prefix dist/*.whl
packageEntries ${PYTHON_PACKAGES[i]} \
$prefix/lib/python*
done
}