Files
haikuports/dev-python/setuptools_rust/setuptools_rust-1.11.1.recipe
Oscar Lesta bfc10710d1 setuptools_rust: update to 1.11.1.
Not used by anything on-tree currently. Still, was in dire need
of a clean up. Using pip in .recipes is a big NO NO.

Previous version of this package included, besides setuptools_rust code,
modules for tomli, setuptools, semantic_version, distutils-precedence, and
pkg_resources. All which would override the files from "proper" .hpkg for
those modules, depending on package activation order.

Also, this brings down the size of the package from 1.6 MiB to 47 KiB.
2025-08-28 01:51:49 -03:00

72 lines
1.7 KiB
Bash

SUMMARY="Compile and distribute Python extensions written in Rust"
DESCRIPTION="setuptools_rust handles detecting and managing your build environment in relation \
to the Rust toolchain."
HOMEPAGE="https://github.com/PyO3/setuptools-rust"
COPYRIGHT="2017-2018 PyO3 project & contributors"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://files.pythonhosted.org/packages/source/${portName:0:1}/$portName/$portName-$portVersion.tar.gz"
CHECKSUM_SHA256="7dabc4392252ced314b8050d63276e05fdc5d32398fc7d3cce1f6a6ac35b76c0"
SOURCE_DIR="$portName-$portVersion"
ARCHITECTURES="any"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku
"
BUILD_REQUIRES="
haiku_devel
"
PYTHON_VERSIONS=(3.10)
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_${pythonPackage}=\"
${portName}_$pythonPackage = $portVersion
\""
eval "REQUIRES_$pythonPackage=\"
haiku
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
build_$pythonPackage
installer_$pythonPackage
setuptools_$pythonPackage
wheel_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:python$pythonVersion
"
done
BUILD()
{
# This is an "any" package, "building" it will create a
# "$portBaseName-$portVersion-py3-none-any.whl" file that can be installed
# on multiple Python versions, so we only need to build once.
python=python${PYTHON_VERSIONS[0]}
$python -m build --wheel --skip-dependency-check --no-isolation
}
INSTALL()
{
for pythonVersion in ${PYTHON_VERSIONS[@]}; do
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
$python -m installer --p $prefix dist/$portName-$portVersion-*-none-any.whl
packageEntries $pythonPackage \
$prefix/lib/python*
done
}