pep517, new python recipe (#7023)

This commit is contained in:
Schrijvers Luc
2022-07-05 15:06:26 +02:00
committed by GitHub
parent 211d46e59d
commit d7ed4e94be

View File

@@ -0,0 +1,69 @@
SUMMARY="API to call PEP 517 hooks"
DESCRIPTION="PEP 517 specifies a standard API for systems which build Python packages.
PEP 660 extends it with a build mode that leads to editable installs.
This package contains wrappers around the hooks specified by PEP 517 and
PEP 660. It provides:
- A mechanism to call the hooks in a subprocess, so they are isolated from the current process.
- Fallbacks for the optional hooks, so that frontends can call the hooks without checking which \
are defined."
HOMEPAGE="https://pypi.org/project/pep517/"
COPYRIGHT="2017 Thomas Kluyver"
LICENSE="MIT"
REVISION="1"
pypiVersion="0a/65/6e656d49c679136edfba25f25791f45ffe1ea4ae2ec1c59fe9c35e061cd1"
SOURCE_URI="https://files.pythonhosted.org/packages/$pypiVersion/pep517-0.12.0.tar.gz"
CHECKSUM_SHA256="931378d93d11b298cf511dd634cf5ea4cb249a28ef84160b3247ee9afb4e8ab0"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_PACKAGES=(python3 python38 python39 python310)
PYTHON_VERSIONS=(3.7 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\n\
tomli_$pythonPackage\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
setuptools_$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
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
done
}