diff --git a/dev-python/cython/cython-0.29.32.recipe b/dev-python/cython/cython-0.29.32.recipe deleted file mode 100644 index 6d85e246f..000000000 --- a/dev-python/cython/cython-0.29.32.recipe +++ /dev/null @@ -1,83 +0,0 @@ -SUMMARY="Optimising static compiler for Python" -DESCRIPTION="Cython is an optimising static compiler for both the Python \ -programming language and the extended Cython programming language (based on \ -Pyrex). It makes writing C extensions for Python as easy as Python itself." -HOMEPAGE="https://cython.org/" -COPYRIGHT="2007-2020 Stefan Behnel, Robert Bradshaw, et al." -LICENSE="Apache v2" -REVISION="3" -SOURCE_URI="https://github.com/cython/cython/archive/$portVersion.tar.gz" -CHECKSUM_SHA256="3f53fbe1398666e77fd4ce388f939309a11efd273d16f20f58f0df7b03d6b4cc" -SOURCE_FILENAME="cython-$portVersion.tar.gz" - -ARCHITECTURES="all !x86_gcc2" -SECONDARY_ARCHITECTURES="x86" - -PROVIDES=" - $portName = $portVersion - " -REQUIRES=" - haiku$secondaryArchSuffix - " - -BUILD_REQUIRES=" - haiku${secondaryArchSuffix}_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]} -eval "PROVIDES_${pythonPackage}=\"\ - ${portName}_$pythonPackage = $portVersion\n\ - cmd:cygdb$pythonVersion\n\ - cmd:cython$pythonVersion\n\ - cmd:cythonize$pythonVersion\n\ - \"; \ -REQUIRES_$pythonPackage=\"\ - haiku\n\ - cmd:python$pythonVersion\ - \"" -if [ "$targetArchitecture" = "x86_gcc2" ]; then - eval "PROVIDES_${pythonPackage}+=\"\n\ - cython_$pythonPackage = $portVersion\ - \"" -fi -BUILD_REQUIRES="$BUILD_REQUIRES - setuptools_$pythonPackage - " -BUILD_PREREQUIRES="$BUILD_PREREQUIRES - cmd:gcc$secondaryArchSuffix - cmd:make - 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" - - for file in cygdb cython cythonize; \ - do mv "$prefix"/bin/$file "$prefix"/bin/${file}$pythonVersion ; \ - done - install -m 755 -d "$docDir" - install -m 644 -t "$docDir" README.rst - - packageEntries $pythonPackage \ - "$prefix"/lib/$python \ - "$prefix"/bin \ - "$docDir" - done -} - diff --git a/dev-python/cython/cython-0.29.36.recipe b/dev-python/cython/cython-0.29.36.recipe new file mode 100644 index 000000000..9873e29e1 --- /dev/null +++ b/dev-python/cython/cython-0.29.36.recipe @@ -0,0 +1,110 @@ +SUMMARY="Optimising static compiler for Python" +DESCRIPTION="Cython is an optimising static compiler for both the Python \ +programming language and the extended Cython programming language (based on \ +Pyrex). It makes writing C extensions for Python as easy as Python itself." +HOMEPAGE="https://cython.org/" +COPYRIGHT="2007-2023 Stefan Behnel, Robert Bradshaw, et al." +LICENSE="Apache v2" +REVISION="1" +SOURCE_URI="https://files.pythonhosted.org/packages/source/c/cython/Cython-$portVersion.tar.gz" +CHECKSUM_SHA256="41c0cfd2d754e383c9eeb95effc9aa4ab847d0c9747077ddd7c0dcb68c3bc01f" +SOURCE_DIR="Cython-$portVersion" +SOURCE_FILENAME="Cython-$portVersion.tar.gz" + +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + $portName = $portVersion + " +REQUIRES=" + haiku$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:make + " + +PYTHON_VERSIONS=(3.9 3.10) # Build packages for these Python versions. +defaultVersion=3.10 # And treat this one as the default. + +for i in "${!PYTHON_VERSIONS[@]}"; do + pythonVersion=${PYTHON_VERSIONS[$i]} + pythonPackage=python${pythonVersion//.} + + eval "PROVIDES_${pythonPackage}=\" + ${portName}_$pythonPackage = $portVersion + cmd:cygdb$pythonVersion + cmd:cython$pythonVersion + cmd:cythonize$pythonVersion + \"" + + if [ "$targetArchitecture" = x86_gcc2 ]; then + eval "PROVIDES_${pythonPackage}+=\" + cython_$pythonPackage = $portVersion + \"" + fi + + # Provide non version-suffixed cmds for the default Python version + if [ $pythonVersion = $defaultVersion ]; then + eval "PROVIDES_${pythonPackage}+=\" + cmd:cygdb = $portVersion + cmd:cython = $portVersion + cmd:cythonize = $portVersion + \"" + fi + + eval "REQUIRES_$pythonPackage=\" + $REQUIRES + cmd:python$pythonVersion + \"" + + BUILD_REQUIRES+=" + build_$pythonPackage + installer_$pythonPackage + setuptools_$pythonPackage + wheel_$pythonPackage + " + BUILD_PREREQUIRES+=" + cmd:python$pythonVersion + " +done + +INSTALL() +{ + for i in "${!PYTHON_VERSIONS[@]}"; do + pythonVersion=${PYTHON_VERSIONS[$i]} + pythonPackage=python${pythonVersion//.} + + python=python$pythonVersion + + rm -rf dist + + $python -m build --wheel --skip-dependency-check --no-isolation + $python -m installer --p $prefix dist/*.whl + + # Version suffix all the scripts + for command in cygdb cython cythonize; do + mv $prefix/bin/$command $prefix/bin/$command$pythonVersion + done + + # And provide suffix-less symlinks for the default version + if [ $pythonVersion = $defaultVersion ]; then + for command in $prefix/bin/*; do + ln -sr $command ${command%$pythonVersion} + done + fi + + install -m 755 -d "$docDir" + install -m 644 -t "$docDir" README.rst + + packageEntries $pythonPackage \ + $prefix/lib/python* \ + $prefix/bin/* \ + $docDir + done +}