Skip to content

Commit 8de5de2

Browse files
committed
[Fix] Check for Runtime in DYLD_FALLBACK... on Mac (fixes #32)
1 parent a84852a commit 8de5de2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

spm/_spm/__init__.py

+6
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,14 @@ def get_paths_from_os(self):
117117
raise RuntimeError('Operating system {0} is not supported.'.format(self.system))
118118

119119
path_elements = []
120+
120121
if self.path_var in os.environ:
121122
path_elements = os.environ[self.path_var].split(os.pathsep)
123+
124+
# On the Mac, do an additional check on DYLD_FALLBACK_LIBRARY_PATH environment variable
125+
if not path_elements and self.system == 'Darwin':
126+
path_elements = os.environ['DYLD_FALLBACK_LIBRARY_PATH'].split(os.pathsep)
127+
122128
if not path_elements:
123129
if self.system == 'Darwin':
124130
raise RuntimeError('On the Mac, you must run mwpython rather than python ' +

0 commit comments

Comments
 (0)