Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary system dependencies #97

Merged
merged 2 commits into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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