Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
6411b5f6
Commit
6411b5f6
authored
Feb 11, 2016
by
jimreesman
Browse files
detect OS X, and query sysconfig for libdir
parent
c9090bfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
setup.py
setup.py
+13
-0
No files found.
setup.py
View file @
6411b5f6
...
...
@@ -466,6 +466,19 @@ class build(_build):
if
sys
.
version_info
>=
(
3
,
0
):
cmake_extra_arch
+=
[
'-DPYTHON3=yes'
]
log
.
info
(
"Detected platform: %s"
%
sys
.
platform
)
if
sys
.
platform
==
"darwin"
:
# build on OS X
inc_dir
=
get_python_inc
()
cmake_extra_arch
+=
[
'-DPYTHON_INCLUDE_DIR={inc}'
.
format
(
inc
=
inc_dir
)]
# by default, cmake will choose the system python lib in /usr/lib
# this checks the sysconfig and will correctly pick up a brewed python lib
# e.g. in /usr/local/Cellar
py_ver
=
get_python_version
()
py_lib
=
os
.
path
.
join
(
get_config_var
(
'LIBDIR'
),
'libpython'
+
py_ver
+
'.dylib'
)
cmake_extra_arch
+=
[
'-DPYTHON_LIBRARY={lib}'
.
format
(
lib
=
py_lib
)]
if
platform_arch
==
'64bit'
and
sys
.
platform
==
"win32"
:
# 64bit build on Windows
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment