Files
haikuports/dev-python/scipy/scipy-1.6.3.recipe
OscarL c70561db3c scipy: disable recipe for now. (#10720)
* noteshrink: fix missing executable permision.

Forgot to do this when combined the "sed" + "cp" lines I had before.

* scipy: disable recipe to avoid future hangs on the buildmasters.
2024-07-21 19:07:48 +02:00

124 lines
3.3 KiB
Bash

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.
This package does not contain ndimage module."
HOMEPAGE="https://www.scipy.org/"
COPYRIGHT=" 2001-2002 Enthought, Inc.
2003-2021 SciPy Developers"
LICENSE="BSD (3-clause)"
REVISION="6"
SOURCE_URI="https://github.com/scipy/scipy/releases/download/v$portVersion/scipy-$portVersion.tar.xz"
CHECKSUM_SHA256="3851fdcb1e6877241c3377aa971c85af0d44f90c57f4dd4e54e1b2bbd742635e"
SOURCE_DIR="scipy-$portVersion"
PATCHES="scipy-$portVersion.patchset"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
$portName = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
gcc${secondaryArchSuffix}_syslibs
numpy$secondaryArchSuffix
lib:libblis$secondaryArchSuffix
lib:liblapack$secondaryArchSuffix
lib:libopenblas$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libblis$secondaryArchSuffix
devel:liblapack$secondaryArchSuffix
devel:libopenblas$secondaryArchSuffix
"
PYTHON_VERSIONS=(3.10)
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
eval "PROVIDES_$pythonPackage=\"
${portName}_$pythonPackage = $portVersion
\""
if [ "$targetArchitecture" = x86_gcc2 ]; then
eval "PROVIDES_$pythonPackage+=\"
scipy_$pythonPackage = $portVersion
\""
fi
eval "REQUIRES_$pythonPackage=\"
haiku$secondaryArchSuffix
scipy$secondaryArchSuffix == $portVersion base
cmd:python$pythonVersion
\""
BUILD_REQUIRES+="
pybind11_$pythonPackage
numpy_$pythonPackage
setuptools_$pythonPackage
"
BUILD_PREREQUIRES+="
cmd:g++$secondaryArchSuffix
cmd:gfortran$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python$pythonVersion
"
done
INSTALL()
{
# Check at every update in site.cfg.example!
cat > site.cfg << EOF
[ALL]
libraries = execinfo,lapack,openblas
library_dirs = /system/$relativeDevelopLibDir
include_dirs = /system/$relativeIncludeDir
runtime_library_dirs = /system/$relativeLibDir
[openblas]
libraries = openblas
library_dirs = /system/$relativeDevelopLibDir
include_dirs = /system/$relativeIncludeDir
runtime_library_dirs = /system/$relativeLibDir
[blis]
libraries = blis
library_dirs = /system/$relativeDevelopLibDir
include_dirs = /system/$relativeIncludeDir/blis
runtime_library_dirs = /system/$relativeLibDir
[lapack]
library_dirs = /system/$relativeDevelopLibDir
include_dirs = /system/$relativeIncludeDir
runtime_library_dirs = /system/$relativeLibDir
EOF
rm -rf doc/sphinxext/.git
for i in "${!PYTHON_VERSIONS[@]}"; do
pythonVersion=${PYTHON_VERSIONS[$i]}
pythonPackage=python${pythonVersion//.}
python=python$pythonVersion
installLocation=$prefix/lib/$python/vendor-packages/
export PYTHONPATH=$installLocation:$PYTHONPATH
mkdir -p $installLocation
rm -rf build
$python setup.py build install \
--root=/ --prefix=$prefix
packageEntries $pythonPackage \
$prefix/lib/python*
done
}