|
| 1 | +diff --git a/scipy/linalg.pxd b/scipy/linalg.pxd |
| 2 | +index 1f656b87..c7c49f9a 100644 |
| 3 | +--- a/scipy/linalg.pxd |
| 4 | ++++ b/scipy/linalg.pxd |
| 5 | +@@ -1 +1 @@ |
| 6 | +-from .linalg cimport cython_blas, cython_lapack |
| 7 | ++from scipy.linalg cimport cython_blas, cython_lapack |
| 8 | +diff --git a/scipy/meson.build b/scipy/meson.build |
| 9 | +index 21ea04d5..71d54804 100644 |
| 10 | +--- a/scipy/meson.build |
| 11 | ++++ b/scipy/meson.build |
| 12 | +@@ -197,7 +197,7 @@ _cython_tree = [ |
| 13 | + fs.copyfile('special.pxd'), |
| 14 | + ] |
| 15 | + |
| 16 | +-cython_args = ['-3', '--fast-fail', '--output-file', '@OUTPUT@', '--include-dir', '@BUILD_ROOT@', '@INPUT@'] |
| 17 | ++cython_args = ['-3', '--fast-fail', '--directive', 'legacy_implicit_noexcept=True', '--output-file', '@OUTPUT@', '--include-dir', '@BUILD_ROOT@', '@INPUT@'] |
| 18 | + cython_cplus_args = ['--cplus'] + cython_args |
| 19 | + |
| 20 | + cython_gen = generator(cython, |
| 21 | +diff --git a/scipy/optimize/cython_optimize.pxd b/scipy/optimize/cython_optimize.pxd |
| 22 | +index d5a0bdd7..d35f8da6 100644 |
| 23 | +--- a/scipy/optimize/cython_optimize.pxd |
| 24 | ++++ b/scipy/optimize/cython_optimize.pxd |
| 25 | +@@ -7,5 +7,5 @@ |
| 26 | + # support. Changing it causes an ABI forward-compatibility break |
| 27 | + # (gh-11793), so we currently leave it as is (no further cimport |
| 28 | + # statements should be used in this file). |
| 29 | +-from .cython_optimize._zeros cimport ( |
| 30 | ++from scipy.optimize.cython_optimize._zeros cimport ( |
| 31 | + brentq, brenth, ridder, bisect, zeros_full_output) |
| 32 | +diff --git a/scipy/optimize/meson.build b/scipy/optimize/meson.build |
| 33 | +index 05db6a68..07d46fb9 100644 |
| 34 | +--- a/scipy/optimize/meson.build |
| 35 | ++++ b/scipy/optimize/meson.build |
| 36 | +@@ -231,6 +231,10 @@ endif |
| 37 | + |
| 38 | + _dummy_init_optimize = fs.copyfile('__init__.py') |
| 39 | + |
| 40 | ++_cython_tree = [ |
| 41 | ++ fs.copyfile('cython_optimize.pxd'), |
| 42 | ++] |
| 43 | ++ |
| 44 | + opt_gen = generator(cython, |
| 45 | + arguments : cython_args, |
| 46 | + output : '@BASENAME@.c', |
| 47 | +diff --git a/scipy/special.pxd b/scipy/special.pxd |
| 48 | +index 62cb8280..1daa9fb3 100644 |
| 49 | +--- a/scipy/special.pxd |
| 50 | ++++ b/scipy/special.pxd |
| 51 | +@@ -1 +1 @@ |
| 52 | +-from .special cimport cython_special |
| 53 | ++from scipy.special cimport cython_special |
| 54 | +diff --git a/scipy/special/meson.build b/scipy/special/meson.build |
| 55 | +index f92183f5..09ad0a4f 100644 |
| 56 | +--- a/scipy/special/meson.build |
| 57 | ++++ b/scipy/special/meson.build |
| 58 | +@@ -362,7 +362,7 @@ py3.extension_module('_ufuncs_cxx', |
| 59 | + [ufuncs_cxx_sources, |
| 60 | + uf_cython_gen_cpp.process(cython_special[2]), # _ufuncs_cxx.pyx |
| 61 | + ], |
| 62 | +- cpp_args: cython_cpp_args, |
| 63 | ++ cpp_args: [cython_cpp_args, '-DCYTHON_EXTERN_C=extern "C"'], |
| 64 | + include_directories: [inc_np, '../_lib/boost', '../_lib', |
| 65 | + '../_build_utils/src'], |
| 66 | + link_args: version_link_args, |
| 67 | +diff --git a/scipy/special/setup.py b/scipy/special/setup.py |
| 68 | +index 7e8c9608..b38a6ec2 100644 |
| 69 | +--- a/scipy/special/setup.py |
| 70 | ++++ b/scipy/special/setup.py |
| 71 | +@@ -103,7 +103,7 @@ def configuration(parent_package='',top_path=None): |
| 72 | + sources=ufuncs_cxx_src, |
| 73 | + depends=ufuncs_cxx_dep, |
| 74 | + include_dirs=[curdir] + inc_dirs, |
| 75 | +- define_macros=define_macros, |
| 76 | ++ define_macros=define_macros + [('CYTHON_EXTERN_C', 'extern "C"')], |
| 77 | + extra_info=get_info("npymath")) |
| 78 | + ufuncs_cxx_ext._pre_build_hook = set_cxx_flags_hook |
| 79 | + |
| 80 | +diff --git a/tools/cythonize.py b/tools/cythonize.py |
| 81 | +index 402824cb..7ad778da 100755 |
| 82 | +--- a/tools/cythonize.py |
| 83 | ++++ b/tools/cythonize.py |
| 84 | +@@ -94,6 +94,7 @@ def process_pyx(fromfile, tofile, cwd): |
| 85 | + flags = ['--fast-fail', '-3'] |
| 86 | + if tofile.endswith('.cxx'): |
| 87 | + flags += ['--cplus'] |
| 88 | ++ flags += ['--directive', 'legacy_implicit_noexcept=true'] |
| 89 | + |
| 90 | + try: |
| 91 | + try: |
0 commit comments