summaryrefslogtreecommitdiff
path: root/ext/pybind11/pybind11
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pybind11/pybind11')
-rw-r--r--ext/pybind11/pybind11/__main__.py37
-rw-r--r--ext/pybind11/pybind11/_version.py2
2 files changed, 38 insertions, 1 deletions
diff --git a/ext/pybind11/pybind11/__main__.py b/ext/pybind11/pybind11/__main__.py
new file mode 100644
index 000000000..9ef837802
--- /dev/null
+++ b/ext/pybind11/pybind11/__main__.py
@@ -0,0 +1,37 @@
+from __future__ import print_function
+
+import argparse
+import sys
+import sysconfig
+
+from . import get_include
+
+
+def print_includes():
+ dirs = [sysconfig.get_path('include'),
+ sysconfig.get_path('platinclude'),
+ get_include(),
+ get_include(True)]
+
+ # Make unique but preserve order
+ unique_dirs = []
+ for d in dirs:
+ if d not in unique_dirs:
+ unique_dirs.append(d)
+
+ print(' '.join('-I' + d for d in unique_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()
diff --git a/ext/pybind11/pybind11/_version.py b/ext/pybind11/pybind11/_version.py
index 2bb44f715..924115060 100644
--- a/ext/pybind11/pybind11/_version.py
+++ b/ext/pybind11/pybind11/_version.py
@@ -1,2 +1,2 @@
-version_info = (2, 1, 1)
+version_info = (2, 2, 1)
__version__ = '.'.join(map(str, version_info))