pyodide/packages/scipy/meta.yaml

79 lines
2.8 KiB
YAML
Raw Normal View History

2018-07-18 13:32:16 +00:00
package:
name: scipy
2018-10-05 13:26:21 +00:00
version: 0.17.1
2018-07-18 13:32:16 +00:00
source:
2018-10-05 13:26:21 +00:00
# We can't use the version from PyPi as it includes Cythonized files
# generated with an older Cython that does not support Python 3.7
# This requires,
# pip install Cython Tempita
# on the host for the build
url: https://github.com/scipy/scipy/archive/v0.17.1.tar.gz
sha256: bf22383d9e2526ffdc53a6c7d3d66dab45a86291ed35d8e281bd1a5d2c34187b
patches:
2018-10-10 16:19:43 +00:00
# these patches can be found as commits in
# https://github.com/rth/scipy/tree/0.17.1-pyodide
# on top of the v0.17.1 tag
2018-10-18 15:19:20 +00:00
- patches/fix-blas.patch
2018-10-05 13:26:21 +00:00
- patches/fix-build-gcc5-a80460.patch
2018-10-10 10:10:45 +00:00
- patches/force_malloc.patch
2018-10-10 16:19:43 +00:00
- patches/disable_scipy_stats_mvn.patch
2018-10-11 10:03:32 +00:00
- patches/skip-fortran-fails-to-link.patch
- patches/skip_ellip_harm_2_pyx_ctypes.patch
- patches/make-int-return-values.patch
- patches/add-missing-extern.patch
2021-03-23 21:49:38 +00:00
- patches/fix-typo-flapack-pyf.patch
2018-07-18 13:32:16 +00:00
build:
# set linker and C flags to error on anything to do with function declarations being wrong.
# In webassembbly, any conflicts mean that a randomly selected 50% of calls to the function
# will fail. Better to fail at compile or link time.
cflags: |
-I $(PYODIDE_ROOT)/packages/numpy/config
-I$(PYODIDE_ROOT)/packages/CLAPACK/build/CLAPACK-3.2.1/INCLUDE
-DUNDERSCORE_G77
-Werror=implicit-function-declaration
-Werror=mismatched-parameter-types
-Werror=mismatched-return-types
ldflags: |
-L$(NUMPY_LIB)
-Wl,--fatal-warnings
script: |
# Some fixes were extracted from patches/make-int-return-values.patch as regex.
find scipy -name "*.c*" | 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/extern void/extern int/g' scipy/optimize/__minpack.h scipy/fftpack/src/zfftnd.c scipy/fftpack/src/zrfft.c
sed -i 's/void f_/int f_/g' scipy/cluster/cluster_blas.pxd
sed -i 's/void @pref/int @pref/g' scipy/fftpack/src/dct.c.src scipy/fftpack/src/dst.c.src
sed -i 's/^void/int/g' scipy/interpolate/src/__fitpack.h scipy/integrate/__quadpack.h scipy/fftpack/src/drfft.c scipy/fftpack/src/zfft.c
sed -i 's/static void/static int/g' scipy/interpolate/src/__fitpack.h
sed -i 's/ILAENV/ILAENZ/g' scipy/linalg/src/calc_lwork.f
2021-01-10 09:12:48 +00:00
# Regenerate header files after make-int-return-values patch to fix return
# types of f2c functions.
echo "Regenerating cython wrappers"
cd scipy/linalg
python _cython_wrapper_generators.py
cd ../..
2018-07-18 13:32:16 +00:00
requirements:
run:
- numpy
- CLAPACK
2018-10-30 12:10:10 +00:00
test:
imports:
- scipy
2018-10-31 14:06:08 +00:00
- scipy.cluster
- scipy.constants
- scipy.fftpack
- scipy.odr
- scipy.sparse
- scipy.interpolate
- scipy.integrate
2018-10-30 12:10:10 +00:00
- scipy.linalg
2018-10-31 14:06:08 +00:00
- scipy.misc
- scipy.ndimage
- scipy.spatial
2018-10-30 12:10:10 +00:00
- scipy.special