OmniSciDB  94e8789169
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
omnisci.version Namespace Reference

Functions

def get_source_version
 
def get_package_version
 

Function Documentation

def omnisci.version.get_package_version ( )

Definition at line 17 of file version.py.

References omnisci.version.get_source_version().

17 
19  from pkg_resources import get_distribution, DistributionNotFound
20  try:
21  return get_distribution(__name__).version
22  except DistributionNotFound:
23  # package is not installed
24  return get_source_version()
def get_source_version
Definition: version.py:1
def get_package_version
Definition: version.py:17

+ Here is the call graph for this function:

def omnisci.version.get_source_version ( )

Definition at line 1 of file version.py.

References omnisci.open().

Referenced by omnisci.version.get_package_version().

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

+ Here is the call graph for this function:

+ Here is the caller graph for this function: