mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-10 05:40:07 +02:00
60 lines
1.6 KiB
Bash
60 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="1"
|
|
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_PACKAGES=(python38 python39 python310)
|
|
PYTHON_VERSIONS=(3.8 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\
|
|
\""
|
|
BUILD_REQUIRES="$BUILD_REQUIRES
|
|
build_$pythonPackage"
|
|
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
|
|
cmd:python$pythonVersion"
|
|
done
|
|
|
|
INSTALL()
|
|
{
|
|
for i in "${!PYTHON_PACKAGES[@]}"; do
|
|
python=python${PYTHON_VERSIONS[$i]}
|
|
|
|
$python -m build -wn --skip-dependency-check
|
|
PYTHONPATH=src $python -m installer --prefix=$prefix dist/*.whl
|
|
|
|
packageEntries ${PYTHON_PACKAGES[i]} \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|