pyodide/packages/scipy/patches/fix-blas.patch

90 lines
4.0 KiB
Diff
Raw Normal View History

2018-10-26 12:51:30 +00:00
commit eba70f7602827851012acd1b836b5a56a3e70e32
2018-10-18 15:19:20 +00:00
Author: Roman Yurchak <rth.yurchak@pm.me>
Date: Mon Oct 8 10:53:11 2018 +0200
Partial fixes for BLAS/LAPACK
diff --git a/scipy/linalg/setup.py b/scipy/linalg/setup.py
2018-10-26 12:51:30 +00:00
index 2c9b9ba22..6a0c4fa65 100755
2018-10-18 15:19:20 +00:00
--- a/scipy/linalg/setup.py
+++ b/scipy/linalg/setup.py
2018-10-26 12:51:30 +00:00
@@ -14,7 +14,13 @@ def configuration(parent_package='', top_path=None):
2018-10-18 15:19:20 +00:00
config = Configuration('linalg', parent_package, top_path)
- lapack_opt = get_info('lapack_opt')
2018-10-26 12:51:30 +00:00
+ lapack_opt = { # libraries will be auto-generated by pywasmcross
2018-10-18 15:19:20 +00:00
+ 'libraries': [],
+ 'include_dirs': [],
2018-10-26 12:51:30 +00:00
+ 'library_dirs': ['../../../../CLAPACK-WA/'],
+ 'language': 'f77',
2018-10-18 15:19:20 +00:00
+ 'define_macros': [('NO_ATLAS_INFO', 1),
+ ('HAVE_CBLAS', None)]}
if not lapack_opt:
raise NotFoundError('no lapack/blas resources found')
2018-10-26 12:51:30 +00:00
@@ -117,9 +123,22 @@ def configuration(parent_package='', top_path=None):
2018-10-18 15:19:20 +00:00
fnames = split_fortran_files(join(dirname, 'src', 'id_dist', 'src'),
routines_to_split)
fnames = [join('src', 'id_dist', 'src', f) for f in fnames]
- config.add_extension('_interpolative', fnames + ["interpolative.pyf"],
- extra_info=lapack_opt
- )
+ # TODO: The following fails with,
+ # scipy/linalg/src/id_dist/src/idd_sfft.c:114:22: error: conflicting types for 'idd_sffti1__'
+ # /* Subroutine */ int idd_sffti1__(integer *ind, integer *n, doublereal *wsave)
+ # ^
+ # scipy/linalg/src/id_dist/src/idd_sfft.c:72:33: note: previous declaration is here
+ # extern /* Subroutine */ int idd_sffti1__(integer *, integer *,
+ # ^
+ # scipy/linalg/src/id_dist/src/idd_sfft.c:371:22: error: conflicting types for 'idd_sfft1__'
+ # /* Subroutine */ int idd_sfft1__(integer *ind, integer *n, doublereal *v,
+ # ^
+ # scipy/linalg/src/id_dist/src/idd_sfft.c:311:33: note: previous declaration is here
+ # extern /* Subroutine */ int idd_sfft1__(integer *, integer *, doublereal *<Paste>
+ #
+ #config.add_extension('_interpolative', fnames + ["interpolative.pyf"],
+ # extra_info=lapack_opt
+ # )
# _calc_lwork:
config.add_extension('_calc_lwork',
diff --git a/scipy/sparse/linalg/eigen/arpack/setup.py b/scipy/sparse/linalg/eigen/arpack/setup.py
2018-10-26 12:51:30 +00:00
index a8175a9d5..0fafd82b3 100755
2018-10-18 15:19:20 +00:00
--- a/scipy/sparse/linalg/eigen/arpack/setup.py
+++ b/scipy/sparse/linalg/eigen/arpack/setup.py
2018-10-26 12:51:30 +00:00
@@ -11,7 +11,13 @@ def configuration(parent_package='',top_path=None):
2018-10-18 15:19:20 +00:00
config = Configuration('arpack',parent_package,top_path)
- lapack_opt = get_info('lapack_opt')
2018-10-26 12:51:30 +00:00
+ lapack_opt = { # libraries will be auto-generated by pywasmcross
2018-10-18 15:19:20 +00:00
+ 'libraries': [],
+ 'include_dirs': [],
2018-10-26 12:51:30 +00:00
+ 'library_dirs': ['../../../../CLAPACK-WA/'],
+ 'language': 'f77',
2018-10-18 15:19:20 +00:00
+ 'define_macros': [('NO_ATLAS_INFO', 1),
+ ('HAVE_CBLAS', None)]}
if not lapack_opt:
raise NotFoundError('no lapack/blas resources found')
diff --git a/scipy/sparse/linalg/isolve/setup.py b/scipy/sparse/linalg/isolve/setup.py
2018-10-26 12:51:30 +00:00
index becb9237a..c9d4379b1 100755
2018-10-18 15:19:20 +00:00
--- a/scipy/sparse/linalg/isolve/setup.py
+++ b/scipy/sparse/linalg/isolve/setup.py
2018-10-26 12:51:30 +00:00
@@ -11,7 +11,13 @@ def configuration(parent_package='',top_path=None):
2018-10-18 15:19:20 +00:00
config = Configuration('isolve',parent_package,top_path)
- lapack_opt = get_info('lapack_opt')
+ lapack_opt = { # libraries will be auto-generated by pywasmcross
+ 'libraries': [],
+ 'include_dirs': [],
2018-10-26 12:51:30 +00:00
+ 'library_dirs': ['../../../../CLAPACK-WA/'],
+ 'language': 'f77',
2018-10-18 15:19:20 +00:00
+ 'define_macros': [('NO_ATLAS_INFO', 1),
+ ('HAVE_CBLAS', None)]}
if not lapack_opt:
raise NotFoundError('no lapack/blas resources found')