μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Functions | Variables
setup Namespace Reference

Classes

class  SDist
 

Functions

def build_expected_version_hex (matches)
 
def get_and_replace (filename, binary=False, **opts)
 
def TemporaryDirectory ()
 
def remove_output (*sources)
 
str build_expected_version_hex (Dict[str, str] matches)
 
Union[bytes, strget_and_replace (Path filename, bool binary=False, **str opts)
 
Iterator[None] remove_output (*str sources)
 

Variables

 DIR = os.path.abspath(os.path.dirname(__file__))
 
 VERSION_REGEX
 
 global_sdist = os.environ.get("PYBIND11_GLOBAL_SDIST", False)
 
string setup_py = "tools/setup_global.py.in" if global_sdist else "tools/setup_main.py.in"
 
string extra_cmd = 'cmdclass["sdist"] = SDist\n'
 
tuple to_src
 
 code = compile(f.read(), "pybind11/_version.py", "exec")
 
dictionary loc = {}
 
dictionary version = loc["__version__"]
 
 encoding
 
 matches = dict(VERSION_REGEX.findall(f.read()))
 
string cpp_version = "{MAJOR}.{MINOR}.{PATCH}".format(**matches)
 
string msg
 
 version_hex = matches.get("HEX", "MISSING")
 
def expected_version_hex = build_expected_version_hex(matches)
 
list cmd
 
list fcommand
 
 cmake_opts = dict(cwd=DIR, stdout=sys.stdout, stderr=sys.stderr)
 
def txt = get_and_replace(setup_py, version=version, extra_cmd=extra_cmd)
 
 VERSION_FILE = Path("pybind11/_version.py")
 
 COMMON_FILE = Path("include/pybind11/detail/common.h")
 
str exp_version_hex = build_expected_version_hex(matches)
 
 check
 
 True
 
 cwd
 
 stdout
 
 stderr
 

Function Documentation

◆ build_expected_version_hex() [1/2]

str setup.build_expected_version_hex ( Dict[str, str matches)

Definition at line 26 of file setup.py.

References exec(), and len().

◆ build_expected_version_hex() [2/2]

def setup.build_expected_version_hex (   matches)

Definition at line 24 of file setup.py.

References len().

◆ get_and_replace() [1/2]

def setup.get_and_replace (   filename,
  binary = False,
**  opts 
)

Definition at line 96 of file setup.py.

Referenced by setup.SDist.make_release_tree().

◆ get_and_replace() [2/2]

Union[bytes, str] setup.get_and_replace ( Path  filename,
bool   binary = False,
**str   opts 
)

Definition at line 87 of file setup.py.

◆ remove_output() [1/2]

def setup.remove_output ( sources)

Definition at line 136 of file setup.py.

References remove_output().

Referenced by remove_output().

◆ remove_output() [2/2]

Iterator[None] setup.remove_output ( *str  sources)

Definition at line 115 of file setup.py.

References remove_output().

◆ TemporaryDirectory()

def setup.TemporaryDirectory ( )

Definition at line 125 of file setup.py.

Variable Documentation

◆ check

setup.check

Definition at line 139 of file setup.py.

◆ cmake_opts

setup.cmake_opts = dict(cwd=DIR, stdout=sys.stdout, stderr=sys.stderr)

Definition at line 159 of file setup.py.

◆ cmd

list setup.cmd
Initial value:
1= ["cmake", "-S", ".", "-B", tmpdir] + [
2 "-DCMAKE_INSTALL_PREFIX=pybind11",
3 "-DBUILD_TESTING=OFF",
4 "-DPYBIND11_NOPYTHON=ON",
5 ]

Definition at line 147 of file setup.py.

◆ code

setup.code = compile(f.read(), "pybind11/_version.py", "exec")

Definition at line 71 of file setup.py.

◆ COMMON_FILE

setup.COMMON_FILE = Path("include/pybind11/detail/common.h")

Definition at line 23 of file setup.py.

◆ cpp_version

string setup.cpp_version = "{MAJOR}.{MINOR}.{PATCH}".format(**matches)

Definition at line 79 of file setup.py.

◆ cwd

setup.cwd

Definition at line 139 of file setup.py.

◆ DIR

setup.DIR = os.path.abspath(os.path.dirname(__file__))

Definition at line 18 of file setup.py.

◆ encoding

setup.encoding

Definition at line 77 of file setup.py.

◆ exp_version_hex

str setup.exp_version_hex = build_expected_version_hex(matches)

Definition at line 80 of file setup.py.

◆ expected_version_hex

def setup.expected_version_hex = build_expected_version_hex(matches)

Definition at line 87 of file setup.py.

◆ extra_cmd

string setup.extra_cmd = 'cmdclass["sdist"] = SDist\n'

Definition at line 62 of file setup.py.

◆ fcommand

list setup.fcommand
Initial value:
1= [
2 c
3 for c in os.environ["CMAKE_ARGS"].split()
4 if "DCMAKE_INSTALL_PREFIX" not in c
5 ]

Definition at line 153 of file setup.py.

◆ global_sdist

setup.global_sdist = os.environ.get("PYBIND11_GLOBAL_SDIST", False)

Definition at line 59 of file setup.py.

◆ loc

dictionary setup.loc = {}

Definition at line 72 of file setup.py.

◆ matches

setup.matches = dict(VERSION_REGEX.findall(f.read()))

Definition at line 78 of file setup.py.

◆ msg

string setup.msg
Initial value:
1= "Python version {} does not match C++ version {}!".format(
2 version, cpp_version
3 )

Definition at line 81 of file setup.py.

◆ setup_py

setup.setup_py = "tools/setup_global.py.in" if global_sdist else "tools/setup_main.py.in"

Definition at line 61 of file setup.py.

◆ stderr

setup.stderr

Definition at line 139 of file setup.py.

◆ stdout

setup.stdout

Definition at line 139 of file setup.py.

◆ to_src

tuple setup.to_src
Initial value:
1= (
2 ("pyproject.toml", "tools/pyproject.toml"),
3 ("setup.py", setup_py),
4)

Definition at line 64 of file setup.py.

◆ True

setup.True

Definition at line 139 of file setup.py.

◆ txt

Definition at line 163 of file setup.py.

◆ version

setup.version = loc["__version__"]

Definition at line 74 of file setup.py.

◆ VERSION_FILE

setup.VERSION_FILE = Path("pybind11/_version.py")

Definition at line 22 of file setup.py.

◆ version_hex

setup.version_hex = matches.get("HEX", "MISSING")

Definition at line 86 of file setup.py.

◆ VERSION_REGEX

setup.VERSION_REGEX
Initial value:
1= re.compile(
2 r"^\s*#\s*define\s+PYBIND11_VERSION_([A-Z]+)\s+(.*)$", re.MULTILINE
3)

Definition at line 19 of file setup.py.