mirror of https://github.com/pyodide/pyodide.git
154 lines
5.2 KiB
YAML
154 lines
5.2 KiB
YAML
package:
|
|
name: scipy
|
|
version: 1.10.1
|
|
tag:
|
|
- min-scipy-stack
|
|
top-level:
|
|
- scipy
|
|
|
|
# See extra explanation in info.md
|
|
#
|
|
# For future reference: if you see the following errors:
|
|
# Declaration error: adjustable dimension on non-argument
|
|
# or:
|
|
# nonconstant array size
|
|
# you are trying to compile code that isn't written to the fortran 77 standard.
|
|
# The line number in the error points to the last line of the problematic
|
|
# subroutine. Try deleting it.
|
|
|
|
source:
|
|
url: https://files.pythonhosted.org/packages/84/a9/2bf119f3f9cff1f376f924e39cfae18dec92a1514784046d185731301281/scipy-1.10.1.tar.gz
|
|
sha256: 2cf9dfb80a7b4589ba4c40ce7588986d6d5cebc5457cad2c2880f6bc2d42f3a5
|
|
|
|
patches:
|
|
- patches/0001-Fix-dstevr-in-special-lapack_defs.h.patch
|
|
- patches/0002-int-to-string.patch
|
|
- patches/0003-fix-fotran-files-minpack.patch
|
|
- patches/0004-gemm_-no-const.patch
|
|
- patches/0005-make-int-return-values.patch
|
|
- patches/0006-Rename-_page_trend_test.py-to-prevent-test-unvendori.patch
|
|
- patches/0007-skip-fortran-fails-to-link.patch
|
|
- patches/0008-Remove-meson-requirements.patch
|
|
- patches/0009-Fix-fitpack.patch
|
|
# TODO remove the next patch when we upgrade to scipy 1.11, since it has
|
|
# been fixed upstream in https://github.com/scipy/scipy/pull/18124
|
|
- patches/0010-When-forward-declaring-print_soln-give-it-the-correc.patch
|
|
- patches/0011-Enable-long-double-support-in-Boost-library-for-emsc.patch
|
|
|
|
build:
|
|
cflags: |
|
|
-I$(WASM_LIBRARY_DIR)/include
|
|
-Wno-return-type
|
|
-DUNDERSCORE_G77
|
|
cxxflags: -fexceptions
|
|
ldflags: |
|
|
-L$(NUMPY_LIB)/core/lib/
|
|
-L$(NUMPY_LIB)/random/lib/
|
|
-fexceptions
|
|
# IMPORTANT: Other locations important in scipy build process:
|
|
# There are two files built in the "capture" pass that need patching:
|
|
# _blas_subroutines.h, and _cython
|
|
# Scipy has a bunch of custom logic implemented in
|
|
# pyodide-build/pyodide_build/_f2c_fixes.py.
|
|
script: |
|
|
set -x
|
|
export PKG_CONFIG_LIBDIR=$WASM_PKG_CONFIG_PATH
|
|
export NPY_BLAS_LIBS="-I$WASM_LIBRARY_DIR/include $WASM_LIBRARY_DIR/lib/libopenblas.so"
|
|
export NPY_LAPACK_LIBS="-I$WASM_LIBRARY_DIR/include $WASM_LIBRARY_DIR/lib/libopenblas.so"
|
|
|
|
sed -i 's/recursive //g' scipy/integrate/quadpack/* scipy/interpolate/fitpack/*
|
|
|
|
# Change many functions that return void into functions that return int
|
|
find scipy -name "*.c*" -type f | xargs sed -i 's/extern void F_FUNC/extern int F_FUNC/g'
|
|
|
|
sed -i 's/void F_FUNC/int F_FUNC/g' scipy/odr/__odrpack.c
|
|
sed -i 's/^void/int/g' scipy/odr/odrpack.h
|
|
sed -i 's/^void/int/g' scipy/odr/__odrpack.c
|
|
|
|
sed -i 's/void BLAS_FUNC/int BLAS_FUNC/g' scipy/special/lapack_defs.h
|
|
# sed -i 's/void F_FUNC/int F_FUNC/g' scipy/linalg/_lapack_subroutines.h
|
|
sed -i 's/extern void/extern int/g' scipy/optimize/__minpack.h
|
|
sed -i 's/void/int/g' scipy/linalg/cython_blas_signatures.txt
|
|
sed -i 's/^void/int/g' scipy/interpolate/src/_fitpackmodule.c
|
|
|
|
sed -i 's/extern void/extern int/g' scipy/sparse/linalg/_dsolve/SuperLU/SRC/*.{c,h}
|
|
sed -i 's/PUBLIC void/PUBLIC int/g' scipy/sparse/linalg/_dsolve/SuperLU/SRC/*.{c,h}
|
|
sed -i 's/^void/int/g' scipy/sparse/linalg/_dsolve/SuperLU/SRC/*.{c,h}
|
|
sed -i 's/^void/int/g' scipy/sparse/linalg/_dsolve/*.{c,h}
|
|
sed -i 's/void \(.\)print/int \1/g' scipy/sparse/linalg/_dsolve/SuperLU/SRC/*.{c,h}
|
|
sed -i 's/TYPE_GENERIC_FUNC(\(.*\), void)/TYPE_GENERIC_FUNC(\1, int)/g' scipy/sparse/linalg/_dsolve/_superluobject.h
|
|
|
|
sed -i 's/^void/int/g' scipy/optimize/_trlib/trlib_private.h
|
|
sed -i 's/^void/int/g' scipy/optimize/_trlib/trlib/trlib_private.h
|
|
sed -i 's/, int)/)/g' scipy/optimize/_trlib/trlib_private.h
|
|
sed -i 's/, 1)/)/g' scipy/optimize/_trlib/trlib_private.h
|
|
|
|
sed -i 's/^void/int/g' scipy/spatial/qhull_misc.h
|
|
sed -i 's/, size_t)/)/g' scipy/spatial/qhull_misc.h
|
|
sed -i 's/,1)/)/g' scipy/spatial/qhull_misc.h
|
|
|
|
# Input error causes "duplicate symbol" linker errors. Empty out the file.
|
|
echo "" > scipy/sparse/linalg/_dsolve/SuperLU/SRC/input_error.c
|
|
|
|
cross-build-env: true
|
|
cross-build-files:
|
|
- scipy/linalg/cython_lapack.pxd
|
|
- scipy/linalg/cython_blas.pxd
|
|
|
|
requirements:
|
|
host:
|
|
- numpy
|
|
- openblas
|
|
- boost-cpp
|
|
run:
|
|
- numpy
|
|
- openblas
|
|
executable:
|
|
- gfortran
|
|
- f2c
|
|
|
|
test:
|
|
imports:
|
|
- scipy
|
|
- scipy.cluster
|
|
- scipy.cluster.vq
|
|
- scipy.cluster.hierarchy
|
|
- scipy.constants
|
|
- scipy.fft
|
|
- scipy.fftpack
|
|
- scipy.integrate
|
|
- scipy.interpolate
|
|
- scipy.io
|
|
- scipy.io.arff
|
|
- scipy.io.matlab
|
|
- scipy.io.wavfile
|
|
- scipy.linalg
|
|
- scipy.linalg.blas
|
|
- scipy.linalg.cython_blas
|
|
- scipy.linalg.lapack
|
|
- scipy.linalg.cython_lapack
|
|
- scipy.linalg.interpolative
|
|
- scipy.misc
|
|
- scipy.ndimage
|
|
- scipy.odr
|
|
- scipy.optimize
|
|
- scipy.signal
|
|
- scipy.signal.windows
|
|
- scipy.sparse
|
|
- scipy.sparse.linalg
|
|
- scipy.sparse.csgraph
|
|
- scipy.spatial
|
|
- scipy.spatial.distance
|
|
- scipy.spatial.transform
|
|
- scipy.special
|
|
- scipy.stats
|
|
- scipy.stats.contingency
|
|
- scipy.stats.distributions
|
|
- scipy.stats.mstats
|
|
- scipy.stats.qmc
|
|
about:
|
|
home: https://www.scipy.org
|
|
PyPI: https://pypi.org/project/scipy
|
|
summary: "SciPy: Scientific Library for Python"
|
|
license: BSD
|