Files
haikuports/dev-python/wheel/wheel-0.41.2.recipe
Oscar Lesta b6c238cb37 wheel: drop Python 3.9 support.
All on-tree users already target 3.10 only.
2025-09-20 02:00:39 -03:00

89 lines
2.1 KiB
Bash

SUMMARY="A built-package format for Python"
DESCRIPTION="This library is the reference implementation of the Python wheel packaging standard, \
as defined in PEP 427.
It has two different roles:
- A setuptools extension for building wheels that provides the bdist_wheel setuptools command
- A command line tool for working with wheel files
It should be noted that wheel is not intended to be used as a library, and as such there is no \
stable, public API."
HOMEPAGE="https://pypi.org/project/wheel"
COPYRIGHT="2012 Daniel Holth and contributors"
LICENSE="MIT"
REVISION="2"
SOURCE_URI="https://files.pythonhosted.org/packages/py3/${portName:0:1}/$portName/$portName-$portVersion-py3-none-any.whl#noarchive"
CHECKSUM_SHA256="75909db2664838d015e3d9139004ee16711748a52c8f336b52882266540215d8"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
# Add more versions here as necessary:
PYTHON_VERSIONS=(3.10)
# And don't forget to change this if the default Python version on Haiku changes:
defaultVersion=3.10
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
cmd:wheel_$pythonVersion
\""
if [ $pythonVersion = $defaultVersion ]; then
eval "PROVIDES_$pythonPackage+=\"
cmd:wheel = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
installer_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
$python -m installer -p $prefix $portName-$portVersion-py3-none-any.whl
# Version suffix all the scripts
for f in $binDir/*; do
mv $f $f-$pythonVersion
done
# And provide suffix-less symlinks for the default version
if [ $pythonVersion = $defaultVersion ]; then
for f in $binDir/*; do
ln -sr $f ${f%-$pythonVersion}
done
fi
packageEntries $pythonPackage \
$prefix/lib/python* \
$binDir
done
}