build: update to version 1.0.3 (#9567)

Performed the usual recipes cleanups.
This commit is contained in:
OscarL
2023-10-04 04:08:33 -03:00
committed by GitHub
parent 3230e049c3
commit dc323d814f
2 changed files with 82 additions and 64 deletions

View File

@@ -1,64 +0,0 @@
SUMMARY="A simple, correct PEP 517 build frontend"
DESCRIPTION="build will invoke the PEP 517 hooks to build a distribution package.
It is a simple build tool and does not perform any dependency management."
HOMEPAGE="https://pypi.org/project/build/"
COPYRIGHT="2010-2022 Filipe Laíns"
LICENSE="MIT"
REVISION="2"
SOURCE_URI="https://github.com/pypa/build/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="0cbeebaa6047cf8bfc82451038479e41d6cf1e196126a8a110991b1173b39390"
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\n\
cmd:pyproject_build$pythonVersion\
\"; \
REQUIRES_$pythonPackage=\"\
haiku\n\
cmd:python$pythonVersion\n\
packaging_$pythonPackage\n\
pyproject_hooks_$pythonPackage\n\
tomli_$pythonPackage\
\""
BUILD_REQUIRES="$BUILD_REQUIRES
build_$pythonPackage
flit_core_$pythonPackage
installer_$pythonPackage
pyproject_hooks_$pythonPackage"
BUILD_PREREQUIRES="$BUILD_PREREQUIRES
cmd:python$pythonVersion"
done
INSTALL()
{
for i in "${!PYTHON_PACKAGES[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
python=python$pythonVersion
$python -m build --wheel --skip-dependency-check --no-isolation
$python -m installer -p $prefix dist/*.whl
mv $prefix/bin/pyproject-build $prefix/bin/pyproject-build$pythonVersion
packageEntries ${PYTHON_PACKAGES[i]} \
$prefix/lib/python* \
$prefix/bin
done
}

View File

@@ -0,0 +1,82 @@
SUMMARY="A simple, correct PEP 517 build frontend"
DESCRIPTION="build will invoke the PEP 517 hooks to build a distribution package.
It is a simple build tool and does not perform any dependency management."
HOMEPAGE="https://pypi.org/project/build/"
COPYRIGHT="2010-2023 Filipe Laíns"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/pypa/build/archive/refs/tags/$portVersion.tar.gz"
CHECKSUM_SHA256="4f9201228d0af78aac3c672e89a81749a001d8d7f448cf9196d93cce8d5ee45a"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_VERSIONS=(3.9 3.10)
defaultVersion=3.10
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
cmd:pyproject_build_$pythonVersion
\""
if [ $pythonVersion = $defaultVersion ]; then
eval "PROVIDES_${pythonPackage}+=\"
cmd:pyproject_build
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
packaging_$pythonPackage
pyproject_hooks_$pythonPackage
tomli_$pythonPackage
\""
BUILD_REQUIRES+="
build_$pythonPackage
flit_core_$pythonPackage
installer_$pythonPackage
pyproject_hooks_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
INSTALL()
{
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
$python -m flit_core.wheel
$python -m installer -p $prefix dist/*.whl
# Version the script, but provide suffix-less symlink for the default Python version.
mv $prefix/bin/pyproject-build $prefix/bin/pyproject-build-$pythonVersion
if [ $pythonVersion = $defaultVersion ]; then
ln -sr $prefix/bin/pyproject-build-$pythonVersion $prefix/bin/pyproject-build
fi
packageEntries $pythonPackage \
$prefix/lib/python* \
$prefix/bin
done
}