mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
build, new python recipe (#7020)
This commit is contained in:
68
dev-python/build/build-0.8.0.recipe
Normal file
68
dev-python/build/build-0.8.0.recipe
Normal file
@@ -0,0 +1,68 @@
|
||||
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="1"
|
||||
SOURCE_URI="https://github.com/pypa/build/archive/refs/tags/0.8.0.tar.gz"
|
||||
CHECKSUM_SHA256="8aba5ec4dcb52ede2a87a62d1bea4052ca4fbc09422a807c43f119033acb9cd8"
|
||||
|
||||
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\n\
|
||||
cmd:pyproject_build$pythonVersion\
|
||||
\"; \
|
||||
REQUIRES_$pythonPackage=\"\
|
||||
haiku\n\
|
||||
cmd:python$pythonVersion\n\
|
||||
flit_core_$pythonPackage\n\
|
||||
importlib_metadata_$pythonPackage\n\
|
||||
packaging_$pythonPackage\n\
|
||||
pep517_$pythonPackage\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
|
||||
|
||||
mv $prefix/bin/pyproject-build $prefix/bin/pyproject-build$pythonVersion
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python* \
|
||||
$prefix/bin
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user