OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
heavydb.version Namespace Reference

Functions

def get_source_version
 
def get_package_version
 

Function Documentation

def heavydb.version.get_package_version ( )

Definition at line 20 of file version.py.

References heavydb.version.get_source_version().

20 
22  try:
23  return importlib_metadata.version("pyheavydb")
24  except importlib_metadata.PackageNotFoundError:
25  # package is not installed
26  return get_source_version()
def get_source_version
Definition: version.py:5
def get_package_version
Definition: version.py:20

+ Here is the call graph for this function:

def heavydb.version.get_source_version ( )

Definition at line 5 of file version.py.

References heavyai.open().

Referenced by heavydb.version.get_package_version().

5 
7  d = dict(MAJOR='6', MINOR='1', MICRO='1', EXTRA='none')
8  here = os.path.abspath(os.path.dirname(__file__))
9  try:
10  f = open(os.path.join(here, '..', '..', 'CMakeLists.txt'))
11  except FileNotFoundError:
12  return None
13  for line in f.readlines():
14  if line.lstrip().startswith('set(MAPD_VERSION_'):
15  k = line.split()[0].rsplit('_', 1)[-1]
16  n = line.split('"')[1]
17  d[k] = n
18  return '{MAJOR}.{MINOR}.{MICRO}{EXTRA}'.format(**d)
19 
int open(const char *path, int flags, int mode)
Definition: heavyai_fs.cpp:66
def get_source_version
Definition: version.py:5

+ Here is the call graph for this function:

+ Here is the caller graph for this function: