From 0b4a653de35ded56fd48dbd65ef9c0ba8da64fb9 Mon Sep 17 00:00:00 2001 From: Nathan Dunfield Date: Tue, 10 Oct 2023 21:00:10 -0500 Subject: [PATCH] Trying to get it to compile --- setup.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup.py b/setup.py index fb9299d7..4b82f849 100644 --- a/setup.py +++ b/setup.py @@ -392,6 +392,13 @@ def add(self, source_file, dependency_mod_time=0.0): hp_extra_compile_args = ['-mfpmath=sse', '-msse2', '-mieee-fp'] +if have_cython: + if [int(x) for x in cython_version.split('.')[:2]] < [3, 0]: + if sys.platform == 'win32': + hp_extra_compile_args.append('/DFORCE_C_LINKAGE') + else: + hp_extra_compile_args.append('-DFORCE_C_LINKAGE') + # SnapPyHP depends implicitly on the source for the main kernel, so we # we delete certain object files to force distutils to rebuild them.