diff --git a/dev-python/cython/cython_python38-0.29.21.recipe b/dev-python/cython/cython_python38-0.29.21.recipe new file mode 100644 index 000000000..ba3e19306 --- /dev/null +++ b/dev-python/cython/cython_python38-0.29.21.recipe @@ -0,0 +1,58 @@ +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="1" +SOURCE_URI="https://github.com/cython/cython/archive/$portVersion.tar.gz" +CHECKSUM_SHA256="e2e38e1f0572ca54d6085df3dec8b607d20e81515fb80215aed19c81e8fe2079" +SOURCE_FILENAME="cython-$portVersion.tar.gz" +SOURCE_DIR="cython-$portVersion" + +ARCHITECTURES="!x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86" + +PROVIDES=" + cython_python38$secondaryArchSuffix = $portVersion + cmd:cygdb3.8$secondaryArchSuffix + cmd:cython3.8$secondaryArchSuffix + cmd:cythonize3.8$secondaryArchSuffix + " +REQUIRES=" + haiku$secondaryArchSuffix + cmd:python3.8 + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + setuptools_python38 + " +BUILD_PREREQUIRES=" + cmd:gcc$secondaryArchSuffix + cmd:make + cmd:python3.8 + " + +BUILD() +{ + $portPackageLinksDir/cmd~python3.8/bin/python3.8 setup.py build +} + +INSTALL() +{ + # GENERIC: all python_setuptools-based installs need this + pythonVersion=$(python3 --version 2>&1 | sed 's/Python //' | head -c3) + installLocation=$prefix/lib/python$pythonVersion/vendor-packages/ + export PYTHONPATH=$installLocation:$PYTHONPATH + mkdir -p $installLocation + + $portPackageLinksDir/cmd~python3.8/bin/python3.8 setup.py install \ + --prefix=$prefix --root=/ --skip-build + + mkdir -p $binDir + for file in cygdb cython cythonize; \ + do mv $prefix/bin/$file $binDir/${file}3.8 ; \ + done +}