Skip to content

Commit

Permalink
Merge pull request #97 from micro-manager/remove-unnecessary-deps
Browse files Browse the repository at this point in the history
Remove unnecessary system dependencies
  • Loading branch information
marktsuchida authored Nov 3, 2023
2 parents 49af90e + 51ce361 commit d53d1bf
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -85,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:
Expand All @@ -97,16 +94,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")],
Expand Down

0 comments on commit d53d1bf

Please sign in to comment.