Files
haikuports/dev-python/pyproject_hooks/pyproject_hooks-1.0.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

78 lines
2.0 KiB
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
SUMMARY="Low-level replacement for pep517"
DESCRIPTION="This is a low-level library for calling build-backends in 'pyproject.toml'-based \
project. It provides the basic functionality to help write tooling that generates distribution files \
from Python projects.
If you want a tool that builds Python packages, youll want to use https://github.com/pypa/build \
instead. This is an underlying piece for pip, build and other “build frontends” use to call \
“build backends” within them.
Note: The 'pep517' project has been replaced by this project (low level) and the 'build' project \
(high level)."
HOMEPAGE="https://pypi.org/project/pyproject_hooks/"
COPYRIGHT="2017 Thomas Kluyver"
LICENSE="MIT"
REVISION="2"
SOURCE_URI="https://github.com/pypa/pyproject-hooks/archive/refs/tags/v$portVersion.tar.gz"
CHECKSUM_SHA256="d45c52f9af6bce94755eecf9dbfe6b3c89ef9a50088a8809f5bbec4ed0f9be0b"
SOURCE_DIR="pyproject-hooks-$portVersion"
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
\""
eval "REQUIRES_$pythonPackage=\"
haiku
tomli_$pythonPackage # only for python < 3.11.
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
flit_core_$pythonPackage
installer_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonPackage=${PYTHON_PACKAGES[i]}
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
rm -rf dist
$python -m flit_core.wheel
$python -m installer -p $prefix dist/*.whl
packageEntries $pythonPackage \
$prefix/lib/python*
done
}