Files
haikuports/dev-python/installer/installer-0.7.0.recipe
Oscar Lesta a47af1cd3e installer: drop Python 3.9 support.
All on-tree users should already be targetting 3.10 only.
2025-09-20 02:33:31 -03:00

70 lines
1.6 KiB
Bash

SUMMARY="A library for installing Python wheels"
DESCRIPTION="This is a low-level library for installing a Python package from a wheel distribution.
It provides basic functionality and abstractions for handling wheels and installing packages from \
wheels.
- Logic for unpacking a wheel (i.e. installation).
- Abstractions for various parts of the unpacking process.
- Extensible simple implementations of the abstractions.
- Platform-independent Python script wrapper generation."
HOMEPAGE="https://pypi.org/project/installer/"
COPYRIGHT="2020 Pradyun Gedam"
LICENSE="MIT"
REVISION="7"
SOURCE_URI="https://pypi.io/packages/source/i/installer/installer-$portVersion.tar.gz"
CHECKSUM_SHA256="a26d3e3116289bb08216e0d0f7d925fcef0b0194eedfa0c944bcaaa106c4b631"
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
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
installdir=$prefix/lib/$python/vendor-packages
rm -rf dist
# We don't use "build" here, to avoid circular depedencies later on.
$python -m flit_core.wheel
PYTHONPATH=src $python -m installer --prefix=$prefix dist/*.whl
packageEntries $pythonPackage \
$prefix/lib/$python
done
}