openCARP
Doxygen code documentation for the open cardiac electrophysiology simulator openCARP
Functions | Variables
build_info Namespace Reference

Functions

def run (cmd, env=None)
 
def locale ()
 
def svn (directory='.')
 
def git (directory='.')
 
def generate ()
 
def print_build_info (filename)
 

Variables

dictionary SVN_NAME_MAPPING = {'RĂ©vision': 'Revision'}
 
string TEMPLATE
 
 filename = sys.argv[1]
 

Function Documentation

◆ generate()

def build_info.generate ( )

Definition at line 148 of file build_info.py.

Here is the caller graph for this function:

◆ git()

def build_info.git (   directory = '.')

Definition at line 88 of file build_info.py.

Here is the caller graph for this function:

◆ locale()

def build_info.locale ( )
Determine the locale to use in SVN.

Definition at line 28 of file build_info.py.

Here is the caller graph for this function:

◆ print_build_info()

def build_info.print_build_info (   filename)
print build info

Definition at line 179 of file build_info.py.

◆ run()

def build_info.run (   cmd,
  env = None 
)
Run a command with subprocess and return the stdout.

Avoiding use of subprocess.check_output to maintain backwards
compatibility.

Definition at line 14 of file build_info.py.

Here is the caller graph for this function:

◆ svn()

def build_info.svn (   directory = '.')
Get information about the SVN repository.

Uses the --show-item syntax instead of parsing the normal svn info output
to avoid issues with language locales.

Definition at line 54 of file build_info.py.

Variable Documentation

◆ filename

string build_info.filename = sys.argv[1]

Definition at line 200 of file build_info.py.

◆ SVN_NAME_MAPPING

dictionary build_info.SVN_NAME_MAPPING = {'Révision': 'Revision'}

Definition at line 52 of file build_info.py.

◆ TEMPLATE

string build_info.TEMPLATE
Initial value:
1 = """// SPDX-FileCopyrightText: Copyright (c) NumeriCor GmbH
2 // SPDX-License-Identifier: LicenseRef-APL-1.1
3 
4 #ifndef __BUILD_INFO__
5 #define __BUILD_INFO__
6 
7 #define GIT_COMMIT_TAG "{tag}"
8 #define GIT_COMMIT_HASH "{commit}"
9 #define GIT_COMMIT_COUNT {revision}
10 #define GIT_PATH "{url}"
11 
12 #define SUBREPO_REVISIONS "{subrepo}"
13 
14 #define SUBREPO_COMMITS "{subrepocommit}"
15 
16 #endif
17 """

Definition at line 130 of file build_info.py.