From c3edeb41127cc8e774cf17995f3bf5216492ec24 Mon Sep 17 00:00:00 2001 From: "Mark A. Tsuchida" Date: Fri, 3 Nov 2023 08:34:32 -0500 Subject: [PATCH 1/2] Remove macOS system dependencies no longer needed MMCore 11 does not need these. --- setup.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/setup.py b/setup.py index b3aa10f..5675c59 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,6 @@ PKG_NAME = "pymmcore" SWIG_MOD_NAME = "pymmcore_swig" IS_WINDOWS = platform.system() == "Windows" -IS_MACOS = platform.system() == "Darwin" ROOT = Path(__file__).parent MMCorePath = ROOT / "mmCoreAndDevices" / "MMCore" MMDevicePath = ROOT / "mmCoreAndDevices" / "MMDevice" @@ -97,16 +96,6 @@ def run(self): os.environ["CFLAGS"] = " ".join(cflags) -# MMCore on macOS currently requires these frameworks (for a feature that -# should be deprecated). Frameworks need to appear on the linker command line -# before the object files, so extra_link_args doesn't work. -if IS_MACOS: - ldflags = ["-framework", "CoreFoundation", "-framework", "IOKit"] - if "LDFLAGS" in os.environ: - ldflags.insert(0, os.environ["LDFLAGS"]) - os.environ["LDFLAGS"] = " ".join(ldflags) - - mmcore_extension = Extension( f"{PKG_NAME}._{SWIG_MOD_NAME}", sources=mmcore_sources + [os.path.join(PKG_NAME, f"{SWIG_MOD_NAME}.i")], From 51ce36162777871ea32aefd44702a53a18965255 Mon Sep 17 00:00:00 2001 From: "Mark A. Tsuchida" Date: Fri, 3 Nov 2023 08:45:32 -0500 Subject: [PATCH 2/2] Remove unnecessary Windows system dependencies MMCore 11 does not need these. --- setup.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 5675c59..9ffb337 100644 --- a/setup.py +++ b/setup.py @@ -84,9 +84,7 @@ def run(self): ] mmcore_libraries = ["MMDevice"] -if IS_WINDOWS: - mmcore_libraries.extend(["Iphlpapi", "Advapi32"]) -else: +if not IS_WINDOWS: mmcore_libraries.extend(["dl"]) if not IS_WINDOWS: