2 import importlib_metadata
6 d = dict(MAJOR=
'6', MINOR=
'1', MICRO=
'1', EXTRA=
'none')
7 here = os.path.abspath(os.path.dirname(__file__))
9 f =
open(os.path.join(here,
'..',
'..',
'CMakeLists.txt'))
10 except FileNotFoundError:
12 for line
in f.readlines():
13 if line.lstrip().startswith(
'set(MAPD_VERSION_'):
14 k = line.split()[0].rsplit(
'_', 1)[-1]
15 n = line.split(
'"')[1]
17 return '{MAJOR}.{MINOR}.{MICRO}{EXTRA}'.format(**d)
22 return importlib_metadata.version(
"pyheavydb")
23 except importlib_metadata.PackageNotFoundError:
int open(const char *path, int flags, int mode)