def get_root():
 root = os.path.realpath(os.path.abspath(os.getcwd()))
 setup_py = os.path.join(root, 'setup.py')
 versioneer_py = os.path.join(root, 'versioneer.py')
 if (not (os.path.exists(setup_py) or os.path.exists(versioneer_py))):
  root = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0])))
  setup_py = os.path.join(root, 'setup.py')
  versioneer_py = os.path.join(root, 'versioneer.py')
 if (not (os.path.exists(setup_py) or os.path.exists(versioneer_py))):
  err = "Versioneer was unable to run the project root directory. Versioneer requires setup.py to be executed from its immediate directory (like 'python setup.py COMMAND'), or in a way that lets it use sys.argv[0] to find the root (like 'python path/to/setup.py COMMAND')."
  raise VersioneerBadRootError(err)
 try:
  me = os.path.realpath(os.path.abspath(__file__))
  me_dir = os.path.normcase(os.path.splitext(me)[0])
  vsr_dir = os.path.normcase(os.path.splitext(versioneer_py)[0])
  if (me_dir != vsr_dir):
   print(('Warning: build in %s is using versioneer.py from %s' % (os.path.dirname(me), versioneer_py)))
 except NameError:
  pass
 return root

def get_root ( ) : root = os . path . realpath ( os . path . abspath ( os . getcwd ( ) ) ) setup_py = os . path . join ( root , 'setup.py' ) versioneer_py = os . path . join ( root , 'versioneer.py' ) if ( not ( os . path . exists ( setup_py ) or os . path . exists ( versioneer_py ) ) ) : root = os . path . dirname ( os . path . realpath ( os . path . abspath ( sys . argv [ 0 ] ) ) ) setup_py = os . path . join ( root , 'setup.py' ) versioneer_py = os . path . join ( root , 'versioneer.py' ) if ( not ( os . path . exists ( setup_py ) or os . path . exists ( versioneer_py ) ) ) : err = "Versioneer was unable to run the project root directory. Versioneer requires setup.py to be executed from its immediate directory (like 'python setup.py COMMAND'), or in a way that lets it use sys.argv[0] to find the root (like 'python path/to/setup.py COMMAND')." raise VersioneerBadRootError ( err ) try : me = os . path . realpath ( os . path . abspath ( __file__ ) ) me_dir = os . path . normcase ( os . path . splitext ( me ) [ 0 ] ) vsr_dir = os . path . normcase ( os . path . splitext ( versioneer_py ) [ 0 ] ) if ( me_dir != vsr_dir ) : print ( ( 'Warning: build in %s is using versioneer.py from %s' % ( os . path . dirname ( me ) , versioneer_py ) ) ) except NameError : pass return root
return a tuple composed of when provided a :term:router instance as the app argument .