Commit 8de627e1 authored by Ian Philips's avatar Ian Philips Committed by Davis E. King

added check for libpython_version#m.dylib present in some virtual environments (#687)

parent 26524fe7
......@@ -526,7 +526,11 @@ class build(_build):
# this checks the sysconfig and will correctly pick up a brewed python lib
# e.g. in /usr/local/Cellar
py_ver = get_python_version()
# check: in some virtual environments the libpython has the form "libpython_#m.dylib
py_lib = os.path.join(get_config_var('LIBDIR'), 'libpython'+py_ver+'.dylib')
if not os.path.isfile(py_lib):
py_lib = os.path.join(get_config_var('LIBDIR'), 'libpython'+py_ver+'m.dylib')
cmake_extra_arch += ['-DPYTHON_LIBRARY={lib}'.format(lib=py_lib)]
if sys.platform == "win32":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment