mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
meson_python, new python recipe (#8851)
This commit is contained in:
75
dev-python/meson-python/meson_python-0.13.1.recipe
Normal file
75
dev-python/meson-python/meson_python-0.13.1.recipe
Normal file
@@ -0,0 +1,75 @@
|
||||
SUMMARY="Short description of ProjectX"
|
||||
DESCRIPTION="``meson-python`` is a Python build backend built on top of the Meson__
|
||||
build system. It enables to use Meson for the configuration and build
|
||||
steps of Python packages. Meson is an open source build system meant
|
||||
to be both extremely fast, and, even more importantly, as user
|
||||
friendly as possible. ``meson-python`` is best suited for building
|
||||
Python packages containing extension modules implemented in languages
|
||||
such as C, C++, Cython, Fortran, Pythran, or Rust. Consult the
|
||||
documentation__ for more details."
|
||||
HOMEPAGE="https://github.com/mesonbuild/meson-python"
|
||||
COPYRIGHT="2022 The meson-python developers
|
||||
2021 Quansight Labs and Filipe Laíns"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="$HOMEPAGE/archive/refs/tags/$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="1637fc6b69b0b3152f5998fa0a6acfb4733c6ec246ea1e811e75e9ba8a53a64c"
|
||||
SOURCE_DIR="meson-python-$portVersion"
|
||||
|
||||
ARCHITECTURES="any"
|
||||
|
||||
PROVIDES="
|
||||
$portName = $portVersion
|
||||
"
|
||||
REQUIRES="
|
||||
haiku
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku_devel
|
||||
"
|
||||
|
||||
PYTHON_PACKAGES=(python38 python39 python310)
|
||||
PYTHON_VERSIONS=(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
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
pyproject_metadata_$pythonPackage
|
||||
tomli_$pythonPackage # python_version < "3.11"
|
||||
# setuptools$pythonPackage >= 60.0; python_version >= "3.12"
|
||||
cmd:meson
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
BUILD_REQUIRES+="
|
||||
build_$pythonPackage
|
||||
installer_$pythonPackage
|
||||
pyproject_metadata_$pythonPackage
|
||||
setuptools_$pythonPackage
|
||||
wheel_$pythonPackage
|
||||
cmd:meson
|
||||
"
|
||||
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
|
||||
|
||||
packageEntries ${PYTHON_PACKAGES[i]} \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user