Files
haikuports/dev-python/cython/python3_cython-0.25.2.recipe
2017-07-04 19:29:48 +02:00

58 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-2016 Stefan Behnel, Robert Bradshaw, et al."
LICENSE="Apache v2"
REVISION="2"
SOURCE_URI="https://pypi.python.org/packages/b7/67/7e2a817f9e9c773ee3995c1e15204f5d01c8da71882016cac10342ef031b/Cython-0.25.2.tar.gz"
CHECKSUM_SHA256="f141d1f9c27a07b5a93f7dc5339472067e2d7140d1c5a9e20112a5665ca60306"
SOURCE_DIR="Cython-$portVersion"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
python3_cython$secondaryArchSuffix = $portVersion
cmd:cygdb3$secondaryArchSuffix
cmd:cython3$secondaryArchSuffix
cmd:cythonize3$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:python3
"
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
mkdir $binDir
for file in cygdb cython cythonize; \
do mv $prefix/bin/$file $binDir/${file}3 ; \
done
}