mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
python-build: bump version
This commit is contained in:
84
dev-python/build/build-1.2.2.recipe
Normal file
84
dev-python/build/build-1.2.2.recipe
Normal file
@@ -0,0 +1,84 @@
|
||||
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="2019 Filipe Laíns"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://files.pythonhosted.org/packages/source/b/build/build-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="119b2fb462adef986483438377a13b2f42064a2a3a4161f24a0cca698a07ac8c"
|
||||
|
||||
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 # only needed for Python < 3.11
|
||||
\""
|
||||
|
||||
BUILD_REQUIRES+="
|
||||
flit_core_$pythonPackage
|
||||
installer_$pythonPackage
|
||||
pyproject_hooks_$pythonPackage
|
||||
tomli_$pythonPackage # only needed for Python < 3.11
|
||||
"
|
||||
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
|
||||
PYTHONPATH=src $python -m build --no-isolation --skip-dependency-check
|
||||
$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
|
||||
}
|
||||
Reference in New Issue
Block a user