Skip to content

Commit 37e6122

Browse files
authored
Merge pull request #113 from sappelhoff/perf/dedupe-lib-search
refactor(lib): remove duplicated library-search blocks
2 parents 28ef5fe + 72c6fa6 commit 37e6122

1 file changed

Lines changed: 0 additions & 24 deletions

File tree

src/pylsl/lib/__init__.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -136,30 +136,6 @@ def find_liblsl_libraries(verbose=False):
136136
if os.path.isfile(path):
137137
yield path
138138

139-
# The active Python env's lib directory (e.g. `conda install -c conda-forge
140-
# liblsl` lands here). ctypes.util.find_library doesn't search here.
141-
env_libdir = os.path.join(sys.prefix, "lib")
142-
for libprefix in ["", "lib"]:
143-
for debugsuffix in ["", "-debug"]:
144-
path = os.path.join(env_libdir, libprefix + "lsl" + debugsuffix + libsuffix)
145-
if os.path.isfile(path):
146-
yield path
147-
148-
# macOS Frameworks (e.g. installed via `brew install labstreaminglayer/tap/lsl`)
149-
# aren't found by ctypes.util.find_library, but the framework binary is a
150-
# regular dylib that ctypes.CDLL can load directly.
151-
if os_name == "Darwin":
152-
framework_roots = [
153-
"/opt/homebrew/Frameworks", # Apple Silicon homebrew
154-
"/usr/local/Frameworks", # Intel homebrew
155-
os.path.expanduser("~/Library/Frameworks"),
156-
"/Library/Frameworks",
157-
]
158-
for root in framework_roots:
159-
path = os.path.join(root, "lsl.framework", "lsl")
160-
if os.path.isfile(path):
161-
yield path
162-
163139

164140
__dload_msg = (
165141
"You can install the LSL library with conda: `conda install -c conda-forge liblsl`"

0 commit comments

Comments
 (0)