mirror of
https://github.com/davisking/dlib.git
synced 2024-11-01 10:14:53 +08:00
added check for libpython_version#m.dylib present in some virtual environments (#687)
This commit is contained in:
parent
26524fe7a1
commit
8de627e105
4
setup.py
4
setup.py
@ -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":
|
||||
|
Loading…
Reference in New Issue
Block a user