Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sds
py-bake
Commits
d935ded0
Commit
d935ded0
authored
Sep 28, 2020
by
Matthieu Dorier
Browse files
using get_include to lookup pybind11 headers
parent
22f066bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
d935ded0
...
...
@@ -7,10 +7,6 @@ import os
import
os.path
import
sys
def
get_pybind11_include
():
path
=
os
.
path
.
dirname
(
pybind11
.
__file__
)
return
'/'
.
join
(
path
.
split
(
'/'
)[
0
:
-
4
]
+
[
'include'
])
(
opt
,)
=
get_config_vars
(
'OPT'
)
os
.
environ
[
'OPT'
]
=
" "
.
join
(
flag
for
flag
in
opt
.
split
()
if
flag
!=
'-Wstrict-prototypes'
...
...
@@ -29,21 +25,21 @@ client_libraries = bake_client['libraries']
client_library_dirs
=
bake_client
[
'library_dirs'
]
client_include_dirs
=
bake_client
[
'include_dirs'
]
client_include_dirs
.
append
(
"."
)
client_include_dirs
.
append
(
get_
pybind11_include
())
client_include_dirs
.
append
(
pybind11
.
get
_include
())
# For server...
bake_server
=
pkgconfig
.
parse
(
'bake-server'
)
server_libraries
=
bake_server
[
'libraries'
]
server_library_dirs
=
bake_server
[
'library_dirs'
]
server_include_dirs
=
bake_server
[
'include_dirs'
]
server_include_dirs
.
append
(
"."
)
server_include_dirs
.
append
(
get_
pybind11_include
())
server_include_dirs
.
append
(
pybind11
.
get
_include
())
# For target...
uuid
=
pkgconfig
.
parse
(
'uuid'
)
target_libraries
=
uuid
[
'libraries'
]
+
bake_client
[
'libraries'
]
target_library_dirs
=
uuid
[
'library_dirs'
]
+
bake_client
[
'library_dirs'
]
target_include_dirs
=
uuid
[
'include_dirs'
]
+
bake_client
[
'include_dirs'
]
target_include_dirs
.
append
(
'.'
)
target_include_dirs
.
append
(
get_
pybind11_include
())
target_include_dirs
.
append
(
pybind11
.
get
_include
())
pk
=
pkgconfig
.
parse
(
'bake-server'
)
target_include_dirs
.
extend
(
pk
[
'include_dirs'
])
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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