aboutsummaryrefslogtreecommitdiffstats
path: root/3rdparty/pybind11/pybind11
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/pybind11/pybind11')
-rw-r--r--3rdparty/pybind11/pybind11/__init__.py12
-rw-r--r--3rdparty/pybind11/pybind11/__main__.py36
-rw-r--r--3rdparty/pybind11/pybind11/_version.py2
3 files changed, 50 insertions, 0 deletions
diff --git a/3rdparty/pybind11/pybind11/__init__.py b/3rdparty/pybind11/pybind11/__init__.py
new file mode 100644
index 00000000..4b1de3ef
--- /dev/null
+++ b/3rdparty/pybind11/pybind11/__init__.py
@@ -0,0 +1,12 @@
+from ._version import version_info, __version__ # noqa: F401 imported but unused
+
+
+def get_include(user=False):
+ import os
+ d = os.path.dirname(__file__)
+ if os.path.exists(os.path.join(d, "include")):
+ # Package is installed
+ return os.path.join(d, "include")
+ else:
+ # Package is from a source directory
+ return os.path.join(os.path.dirname(d), "include")
diff --git a/3rdparty/pybind11/pybind11/__main__.py b/3rdparty/pybind11/pybind11/__main__.py
new file mode 100644
index 00000000..89b263a8
--- /dev/null
+++ b/3rdparty/pybind11/pybind11/__main__.py
@@ -0,0 +1,36 @@
+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()]
+
+ # 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/3rdparty/pybind11/pybind11/_version.py b/3rdparty/pybind11/pybind11/_version.py
new file mode 100644
index 00000000..8d5aa5c7
--- /dev/null
+++ b/3rdparty/pybind11/pybind11/_version.py
@@ -0,0 +1,2 @@
+version_info = (2, 5, 0)
+__version__ = '.'.join(map(str, version_info))