mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 21:30:08 +02:00
x86_64 is used as a baseline: the "x86_64" entry, whatever status it has, is transformed into "all", and then the other entries in ARCHITECTURES either dropped or rearranged appropriately.
65 lines
1.7 KiB
Bash
65 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-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="all ?x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
cython_python$secondaryArchSuffix = $portVersion
|
|
cmd:cygdb2$secondaryArchSuffix
|
|
cmd:cygdb2.7$secondaryArchSuffix
|
|
cmd:cython2$secondaryArchSuffix
|
|
cmd:cython2.7$secondaryArchSuffix
|
|
cmd:cythonize2$secondaryArchSuffix
|
|
cmd:cythonize2.7$secondaryArchSuffix
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
cmd:python2
|
|
"
|
|
REPLACES="
|
|
python_cython
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
setuptools_python
|
|
"
|
|
BUILD_PREREQUIRES="
|
|
cmd:gcc
|
|
cmd:make
|
|
cmd:python2
|
|
"
|
|
|
|
BUILD()
|
|
{
|
|
$portPackageLinksDir/cmd~python2/bin/python2 setup.py build
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
# GENERIC: all python_setuptools-based installs need this
|
|
pythonVersion=$(python2 --version 2>&1 | sed 's/Python //' | head -c3)
|
|
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
|
|
export PYTHONPATH=$installLocation:$PYTHONPATH
|
|
mkdir -p $installLocation
|
|
|
|
$portPackageLinksDir/cmd~python2/bin/python2 setup.py install \
|
|
--root=/ --prefix=$prefix --skip-build
|
|
|
|
mkdir -p $binDir
|
|
for file in cygdb cython cythonize; \
|
|
do mv $prefix/bin/$file $binDir/${file}2 ; \
|
|
done
|
|
}
|