Skip to content

Commit 90119aa

Browse files
fix: wheel build
1 parent 72828f4 commit 90119aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

sciencemode/_cffi.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818

1919
# Try to find the include directory in different locations
2020
devel_root_candidates = [
21+
os.path.abspath("./smpt/ScienceMode_Library/include"),
2122
os.path.abspath("./smpt/ScienceMode_Library"),
23+
os.path.abspath("../smpt/ScienceMode_Library/include"),
2224
os.path.abspath("../smpt/ScienceMode_Library"),
2325
os.path.abspath("../include/ScienceMode4"),
2426
os.path.abspath("./include/ScienceMode4"),
@@ -275,10 +277,8 @@ def visit_FuncDecl(self, node):
275277
library_dirs=[smpt_lib_path], # Using the absolute path variable
276278
# Use static linking for all platforms
277279
extra_compile_args=["-DSMPT_STATIC"],
278-
# Force static linking with appropriate flags for each platform
279-
extra_link_args=[
280-
"-static" if platform.system() != "Windows" else "/WHOLEARCHIVE:smpt"
281-
],
280+
# Modify linking flags to avoid static linking issues
281+
extra_link_args=[] if platform.system() != "Windows" else ["/WHOLEARCHIVE:smpt"],
282282
# Use py_limited_api to avoid symbol name issues when using static linking
283283
py_limited_api=False,
284284
)

0 commit comments

Comments
 (0)