μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
commands.py
Go to the documentation of this file.
1# -*- coding: utf-8 -*-
2import os
3
4DIR = os.path.abspath(os.path.dirname(__file__))
5
6
7def get_include(user=False):
8 # type: (bool) -> str
9 installed_path = os.path.join(DIR, "include")
10 source_path = os.path.join(os.path.dirname(DIR), "include")
11 return installed_path if os.path.exists(installed_path) else source_path
12
13
15 # type: () -> str
16 cmake_installed_path = os.path.join(DIR, "share", "cmake", "pybind11")
17 if os.path.exists(cmake_installed_path):
18 return cmake_installed_path
19 else:
20 msg = "pybind11 not installed, installation required to access the CMake files"
21 raise ImportError(msg)
def get_cmake_dir()
Definition: commands.py:14