Files
haikuports/dev-python/cython/cython_python36-0.29.14.recipe
2019-11-12 19:22:37 +01:00

62 lines
1.7 KiB
Bash

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-2019 Stefan Behnel, Robert Bradshaw, et al."
LICENSE="Apache v2"
REVISION="1"
SOURCE_URI="https://github.com/cython/cython/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="6a3370fda27c020c172805c6257f222624bdd5f73653bb93f4af4e9f282d17f7"
SOURCE_FILENAME="cython-$portVersion.tar.gz"
SOURCE_DIR="cython-$portVersion"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
cython_python36$secondaryArchSuffix = $portVersion
cmd:cygdb3.6$secondaryArchSuffix
cmd:cython3.6$secondaryArchSuffix
cmd:cythonize3.6$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:python3.6m
"
REPLACES="
python3_cython
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
setuptools_python36
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:python3.6m
"
BUILD()
{
$portPackageLinksDir/cmd~python3.6m/bin/python3.6m setup.py build
}
INSTALL()
{
# GENERIC: all python_setuptools-based installs need this
pythonVersion=$(python3.6m --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.6m/bin/python3.6m setup.py install \
--prefix=$prefix --skip-build
mkdir -p $binDir
for file in cygdb cython cythonize; \
do mv $prefix/bin/$file $binDir/${file}3.6 ; \
done
}