diff --git a/dev-python/setuptools_rust/setuptools_rust-1.11.1.recipe b/dev-python/setuptools_rust/setuptools_rust-1.11.1.recipe new file mode 100644 index 000000000..eec3def20 --- /dev/null +++ b/dev-python/setuptools_rust/setuptools_rust-1.11.1.recipe @@ -0,0 +1,71 @@ +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 +} diff --git a/dev-python/setuptools_rust/setuptools_rust-1.8.1.recipe b/dev-python/setuptools_rust/setuptools_rust-1.8.1.recipe deleted file mode 100644 index 4a77a1fa2..000000000 --- a/dev-python/setuptools_rust/setuptools_rust-1.8.1.recipe +++ /dev/null @@ -1,69 +0,0 @@ -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 -}