From 2c92c0ed1bd2e6f25ba747deec4de55bb283ad0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20R=C4=85czy?= Date: Fri, 17 Nov 2023 15:09:08 -0800 Subject: [PATCH] Fat binary for cython ext --- .gitignore | 1 + rednose/SConscript | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index b411c92..bf2b50d 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ __pycache__/ *$py.class # C extensions +*.a *.o *.so diff --git a/rednose/SConscript b/rednose/SConscript index 6abf75f..e246438 100644 --- a/rednose/SConscript +++ b/rednose/SConscript @@ -9,7 +9,8 @@ if common != "": # for SWAGLOG support libs = ['zmq', common] -rednose = env.SharedLibrary("helpers/ekf_sym", cc_sources, LIBS=libs) -rednose_python = envCython.Program("helpers/ekf_sym_pyx.so", "helpers/ekf_sym_pyx.pyx", LIBS=[rednose] + libs + envCython["LIBS"]) +ekf_objects = env.SharedObject(cc_sources) +rednose = env.Library("helpers/ekf_sym", ekf_objects, LIBS=libs) +rednose_python = envCython.Program("helpers/ekf_sym_pyx.so", ["helpers/ekf_sym_pyx.pyx", ekf_objects], LIBS=libs + envCython["LIBS"]) Export('rednose', 'rednose_python')