mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-16 08:40:06 +02:00
113 lines
3.1 KiB
Bash
113 lines
3.1 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."
|
|
HOMEPAGE="https://www.scipy.org/"
|
|
COPYRIGHT=" 2001-2002 Enthought, Inc.
|
|
2003-2025 SciPy Developers"
|
|
LICENSE="BSD (3-clause)"
|
|
REVISION="2"
|
|
SOURCE_URI="https://files.pythonhosted.org/packages/source/s/scipy/scipy-$portVersion.tar.gz"
|
|
CHECKSUM_SHA256="033a75ddad1463970c96a88063a1df87ccfddd526437136b6ee81ff0312ebdf6"
|
|
SOURCE_DIR="scipy-$portVersion"
|
|
|
|
ARCHITECTURES="all !x86_gcc2"
|
|
SECONDARY_ARCHITECTURES="x86"
|
|
|
|
PROVIDES="
|
|
$portName = $portVersion
|
|
"
|
|
REQUIRES="
|
|
haiku$secondaryArchSuffix
|
|
gcc${secondaryArchSuffix}_syslibs # for libgfortran.so.5 and libstdc++.so.6
|
|
# lib:libarpack$secondaryArchSuffix # has embedded fallback under scipy/sparse/linalg/eigen/arpack/ARPACK
|
|
lib:libopenblas$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_REQUIRES="
|
|
haiku${secondaryArchSuffix}_devel
|
|
# devel:libarpack$secondaryArchSuffix
|
|
devel:libopenblas$secondaryArchSuffix
|
|
"
|
|
|
|
BUILD_PREREQUIRES+="
|
|
cmd:cython # >=3.0.8,<3.1.0
|
|
cmd:g++$secondaryArchSuffix
|
|
cmd:gfortran$secondaryArchSuffix
|
|
cmd:make
|
|
cmd:pkg_config$secondaryArchSuffix
|
|
# cmd:pythran # optional. >=0.14.0,<0.18.0 (require pythran_$pythonPackage instead?)
|
|
"
|
|
|
|
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=\"
|
|
$REQUIRES
|
|
haiku$secondaryArchSuffix
|
|
cmd:python$pythonVersion
|
|
\""
|
|
|
|
BUILD_REQUIRES+="
|
|
build_$pythonPackage
|
|
installer_$pythonPackage
|
|
meson_python_$pythonPackage # >=0.15.0,<0.20.0
|
|
numpy_$pythonPackage
|
|
pybind11_$pythonPackage # >=2.13.2,<2.14.0
|
|
"
|
|
BUILD_PREREQUIRES+="
|
|
cmd:python$pythonVersion
|
|
"
|
|
done
|
|
|
|
BUILD()
|
|
{
|
|
rm -rf doc/sphinxext/.git
|
|
|
|
# Note: lapack is now included in openblas and obsolete as a dependency
|
|
|
|
for i in "${!PYTHON_VERSIONS[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
python=python$pythonVersion
|
|
|
|
$python -m build --wheel --skip-dependency-check --no-isolation \
|
|
-Ccompile-args=$jobArgs \
|
|
-Csetup-args="-Duse-pythran=false" \
|
|
-Csetup-args="-Dlapack=openblas" \
|
|
-Cbuilddir="build"
|
|
# Using a explicit build dir here to stop meson from auto-cleaning it on error.
|
|
# (this way you can actually access meson-log.txt if needed).
|
|
done
|
|
}
|
|
|
|
INSTALL()
|
|
{
|
|
for i in "${!PYTHON_VERSIONS[@]}"; do
|
|
pythonVersion=${PYTHON_VERSIONS[$i]}
|
|
pythonPackage=python${pythonVersion//.}
|
|
|
|
python=python$pythonVersion
|
|
|
|
$python -m installer --p $prefix dist/*-$portVersion-*.whl
|
|
|
|
packageEntries $pythonPackage \
|
|
$prefix/lib/python*
|
|
done
|
|
}
|