mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-14 07:40:07 +02:00
dev-python/setuptools_rust: Add new setuptools_rust 1.8.1
This commit is contained in:
69
dev-python/setuptools_rust/setuptools_rust-1.8.1.recipe
Normal file
69
dev-python/setuptools_rust/setuptools_rust-1.8.1.recipe
Normal file
@@ -0,0 +1,69 @@
|
||||
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://pypi.org/project/setuptools-rust"
|
||||
COPYRIGHT="2022-2024 Nikolay Kim"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://pypi.io/packages/source/s/setuptools-rust/setuptools-rust-$portVersion.tar.gz"
|
||||
SOURCE_DIR="setuptools-rust-$portVersion"
|
||||
CHECKSUM_SHA256="94b1dd5d5308b3138d5b933c3a2b55e6d6927d1a22632e509fcea9ddd0f7e486"
|
||||
|
||||
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]}
|
||||
|
||||
# semantic_version_$pythonPackage ??
|
||||
|
||||
eval "PROVIDES_${pythonPackage}=\"
|
||||
${portName}_$pythonPackage = $portVersion
|
||||
\""
|
||||
eval "REQUIRES_$pythonPackage=\"
|
||||
haiku
|
||||
tomli_$pythonPackage # only for Python < 3.11
|
||||
cmd:git
|
||||
cmd:python$pythonVersion
|
||||
\""
|
||||
BUILD_REQUIRES="$BUILD_REQUIRES
|
||||
pip_$pythonPackage
|
||||
tomli_$pythonPackage # only for Python < 3.11
|
||||
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
|
||||
|
||||
pip3 install --target=$installLocation .
|
||||
#mv $prefix/bin/pyproject-build $prefix/bin/pyproject-build$pythonVersion
|
||||
|
||||
packageEntries $pythonPackage \
|
||||
$prefix/lib/python*
|
||||
done
|
||||
}
|
||||
Reference in New Issue
Block a user