diff --git a/src/__init__.py b/src/__init__.py index e50d9ba4..7704c759 100644 --- a/src/__init__.py +++ b/src/__init__.py @@ -4,6 +4,10 @@ if sys.version_info < (3, 8): raise ImportError("nanobind does not support Python < 3.8.") +def source_dir() -> str: + "Return the path to the nanobind source directory." + return os.path.join(os.path.abspath(os.path.dirname(__file__)), "src") + def include_dir() -> str: "Return the path to the nanobind include directory" return os.path.join(os.path.abspath(os.path.dirname(__file__)), "include") @@ -16,6 +20,7 @@ def cmake_dir() -> str: __all__ = ( "__version__", + "source_dir", "include_dir", "cmake_dir", )