6base_path = os.path.abspath(os.path.join(os.path.dirname(__file__),
'..'))
7config_h = os.path.join(base_path,
'include',
'spdlog',
'version.h')
8data = {
'MAJOR': 0,
'MINOR': 0,
'PATCH': 0}
9reg = re.compile(
r'^\s*#define\s+SPDLOG_VER_([A-Z]+)\s+([0-9]+).*$')
11with open(config_h,
'r')
as fp:
15 data[m.group(1)] =
int(m.group(2))
17print(f
"{data['MAJOR']}.{data['MINOR']}.{data['PATCH']}")
void print(std::FILE *f, const text_style &ts, const S &format_str, const Args &... args)