From 1a060fd70df0b9089c34b8f60fba6bb62349b498 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Wed, 13 Apr 2016 18:46:05 +0200 Subject: [PATCH] function for retrieving the header file path (fixes #158) --- pybind11/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pybind11/__init__.py b/pybind11/__init__.py index 4f1853b77..af8f14a8e 100644 --- a/pybind11/__init__.py +++ b/pybind11/__init__.py @@ -1 +1,11 @@ from ._version import version_info, __version__ + + +def get_include(): + import os + try: + from pip import locations + return os.path.dirname( + locations.distutils_scheme('pybind11')['headers']) + except ImportError: + return 'include'