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
gaoqiong
pybind11
Commits
6b442ff9
Commit
6b442ff9
authored
Jun 23, 2017
by
Ivan Smirnov
Committed by
Dean Moldovan
Jun 28, 2017
Browse files
`python -m pybind11 --includes` prints include paths
parent
34b7b54f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
pybind11/__main__.py
pybind11/__main__.py
+31
-0
No files found.
pybind11/__main__.py
0 → 100644
View file @
6b442ff9
from
__future__
import
print_function
import
argparse
import
sys
import
sysconfig
from
.
import
get_include
def
print_includes
():
dirs
=
[
sysconfig
.
get_path
(
'include'
)]
if
sysconfig
.
get_path
(
'platinclude'
)
not
in
dirs
:
dirs
.
append
(
sysconfig
.
get_path
(
'platinclude'
))
if
get_include
()
not
in
dirs
:
dirs
.
append
(
get_include
())
print
(
' '
.
join
(
'-I'
+
d
for
d
in
dirs
))
def
main
():
parser
=
argparse
.
ArgumentParser
(
prog
=
'python -m pybind11'
)
parser
.
add_argument
(
'--includes'
,
action
=
'store_true'
,
help
=
'Include flags for both pybind11 and Python headers.'
)
args
=
parser
.
parse_args
()
if
not
sys
.
argv
[
1
:]:
parser
.
print_help
()
if
args
.
includes
:
print_includes
()
if
__name__
==
'__main__'
:
main
()
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