diff --git a/devsup/__init__.py b/devsup/__init__.py deleted file mode 100644 index 1181707..0000000 --- a/devsup/__init__.py +++ /dev/null @@ -1,2 +0,0 @@ - -VERSION = "0.1" diff --git a/devsup/locate.py b/devsup/locate.py deleted file mode 100644 index a8299d4..0000000 --- a/devsup/locate.py +++ /dev/null @@ -1,86 +0,0 @@ -""" -Locate an EPICS installation -""" - - -import os, os.path, platform - -__all__ = [ - 'base' - 'hostarch', - 'binpath', - 'dbpath', - 'dbdpath', - 'cpppath', -] - -# Existance of these files is required -_files = ['include/epicsVersion.h', 'dbd/base.dbd'] - -_possible = [ - '/usr/local/epics/base', - '/usr/local/epics/base/current', - '/usr/local/lib/epics', - '/opt/epics', - '/opt/epics/base', - '/opt/epics/base/current', - '/usr/lib/epics', -] - -try: - envbase = os.environ['EPICS_BASE'] - if os.path.isdir(envbase): - _possible.insert(-1, envbase) - else: - import warnings - warnings.warn("'%s' does not name a directory"%envbase, RuntimeWarning) - del envbase -except KeyError: - pass - -def _findbase(poss): - for p in poss: - if not os.path.isdir(p): - continue - for f in _files: - fp = os.path.join(p,f) - if not os.path.isfile(fp): - break - return p - raise RuntimeError("Failed to locate EPICS Base") - -base = _findbase(_possible) -del _possible -del _findbase - -try: - _dbg = bool(int(os.environ.get('EPICS_DEBUG', '0'))) -except ValueError: - _dbg = False - - -cpppath = [os.path.join(base,'include')] - -def _findarch(): - _plat = platform.system() - if _plat=='Windows': - cpppath.append(os.path.join(base, 'os', 'WIN32')) - raise RuntimeError("Windows support not complete") - - elif _plat=='Linux': - cpppath.append(os.path.join(base, 'include', 'os', _plat)) - archs = {'32bit':'x86', '64bit':'x86_64'} - arch = archs[platform.architecture()[0]] - - return 'linux-%s%s' % (arch, '-debug' if _dbg else '') - - else: - raise RuntimeError('Unsupported platform %s'%_plat) - -hostarch = _findarch() -del _findarch - -ldpath = [os.path.join(base,'lib',hostarch)] -binpath = [os.path.join(base,'bin',hostarch)] -dbpath = [os.path.join(base,'db',hostarch)] -dbdpath = [os.path.join(base,'dbd',hostarch)]