Files
haikuports/dev-python/cython/cython_python3-0.27.3.recipe
2018-02-13 19:32:17 -05:00

60 lines
1.6 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="http://cython.org/"
COPYRIGHT="2007-2017 Stefan Behnel, Robert Bradshaw, et al."
LICENSE="Apache v2"
REVISION="1"
SOURCE_URI="https://github.com/cython/cython/archive/$portVersion.tar.gz"
CHECKSUM_SHA256="648feb8a257574a3e4ef854475e7d767732ef26e870d2f9fcc1ca5b244b3ac89"
SOURCE_DIR="cython-$portVersion"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
cython_python3$secondaryArchSuffix = $portVersion
cmd:cygdb3$secondaryArchSuffix
cmd:cython3$secondaryArchSuffix
cmd:cythonize3$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:python3
"
REPLACES="
python3_cython
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
setuptools_python3
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:make
cmd:python3
"
BUILD()
{
$portPackageLinksDir/cmd~python3/bin/python3 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/bin/python3 setup.py install \
--prefix=$prefix --skip-build
for file in cygdb cython cythonize; \
do mv $prefix/bin/$file $binDir/${file}3 ; \
done
}