SciPy: new recipe (#3460)

disabled for now
This commit is contained in:
miqlas
2019-10-24 17:18:22 +02:00
committed by Jérôme Duval
parent 68e711fbc6
commit 41960ccf48

View File

@@ -0,0 +1,83 @@
SUMMARY="Scientific algorithms library for Python"
DESCRIPTION="SciPy is an open source library of scientific tools for Python. \
SciPy supplements the popular numpy module, gathering a variety of high level \
science and engineering modules together as a single package. SciPy includes \
modules for graphics and plotting, optimization, integration, special \
functions, signal and image processing, genetic algorithms, ODE solvers, and \
others."
HOMEPAGE="https://www.scipy.org/"
COPYRIGHT="2011-2018 The OpenBLAS Project"
LICENSE="BSD (3-clause)
GNU LGPL v2"
REVISION="1"
SOURCE_URI="https://github.com/scipy/scipy/releases/download/v1.2.0rc2/scipy-1.2.0rc2.tar.xz"
CHECKSUM_SHA256="54b3a2f66c36f3cee1803ae843e249c85d814c2d4c4f18452059cdfa28b748af"
SOURCE_DIR="scipy-$portVersion"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
python_scipy = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:f2py2
cmd:python2
lib:libopenblas$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
setuptools_python
devel:cblas$secondaryArchSuffix
devel:libarpack$secondaryArchSuffix
devel:libblis$secondaryArchSuffix
devel:liblapack$secondaryArchSuffix
devel:libopenblas$secondaryArchSuffix
devel:libumfpack$secondaryArchSuffix
"
BUILD_PREREQUIRES="
pillow
cmd:f2py2
cmd:g++$secondaryArchSuffix
cmd:gfortran$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python2
cmd:swig$secondaryArchSuffix
"
BUILD()
{
# Check at every update in site.cfg.example!
cat > site.cfg << EOF
[ALL]
library_dirs = /system/`echo ${relativeDevelopLibDir}`
include_dirs = /system/`echo ${relativeIncludeDir}`
[openblas]
libraries = openblas
library_dirs = /system/`echo ${relativeDevelopLibDir}`
include_dirs = /system/`echo ${relativeIncludeDir}`
runtime_library_dirs = /system/`echo ${relativeLibDir}`
[lapack]
library_dirs = /system/`echo ${relativeDevelopLibDir}`
lapack_libs = /system/`echo ${relativeIncludeDir}`
EOF
rm -rf doc/sphinxext/.git
$portPackageLinksDir/cmd~python2/bin/python2 setup.py build $jobArgs
}
INSTALL()
{
# GENERIC: all python_setuptools-based installs need this
python=$portPackageLinksDir/cmd~python2/bin/python2
pythonVersion=$($python --version 2>&1 | sed 's/Python //' | head -c3)
installLocation=$prefix/lib/python$pythonVersion/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
$python setup.py build $jobArgs install \
--prefix $prefix
}