cppyabm  1.0.17
An agent-based library to integrate C++ and Python
commands.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 import os
3 
4 
5 DIR = os.path.abspath(os.path.dirname(__file__))
6 
7 
8 def get_include(user=False):
9  # type: (bool) -> str
10  installed_path = os.path.join(DIR, "include")
11  source_path = os.path.join(os.path.dirname(DIR), "include")
12  return installed_path if os.path.exists(installed_path) else source_path
13 
14 
16  # type: () -> str
17  cmake_installed_path = os.path.join(DIR, "share", "cmake", "pybind11")
18  if os.path.exists(cmake_installed_path):
19  return cmake_installed_path
20  else:
21  msg = "pybind11 not installed, installation required to access the CMake files"
22  raise ImportError(msg)
pybind11.commands.get_cmake_dir
def get_cmake_dir()
Definition: commands.py:15
pybind11.commands.get_include
def get_include(user=False)
Definition: commands.py:8