(file) Return to localize.py CVS log (file) (dir) Up to [Development] / JSOC

Diff for /JSOC/localize.py between version 1.19 and 1.24

version 1.19, 2014/05/22 23:01:34 version 1.24, 2016/04/18 18:14:44
Line 11  import filecmp
Line 11  import filecmp
 import xml.etree.ElementTree as ET import xml.etree.ElementTree as ET
 from subprocess import check_output, CalledProcessError from subprocess import check_output, CalledProcessError
  
   if sys.version_info < (2, 7):
       raise Exception("You must run the 2.7 release, or a more recent release, of Python.")
   
 # Constants # Constants
 VERS_FILE = 'jsoc_version.h' VERS_FILE = 'jsoc_version.h'
 SDP_CFG = 'configsdp.txt' SDP_CFG = 'configsdp.txt'
Line 77  PERL_FXNS_B = """sub get
Line 80  PERL_FXNS_B = """sub get
 PY_BINPATH = '#/usr/bin/python\n' PY_BINPATH = '#/usr/bin/python\n'
  
 PY_FXNS_A = """ PY_FXNS_A = """
 class DRMSParams:  class DRMSParams(object):
     def __init__(self):     def __init__(self):
         self.params = {}         self.params = {}
         self.initialize()         self.initialize()
Line 90  class DRMSParams:
Line 93  class DRMSParams:
  
 PY_FXNS_B = """    def get(self, name): PY_FXNS_B = """    def get(self, name):
         if name in self.params:         if name in self.params:
             return self.parms[name]              return self.params[name]
           else:
               return None
   """
   
   PY_FXNS_C = """    def getBool(self, name):
           if name in self.params:
               return bool(self.params[name] == '1')
         else:         else:
             return None             return None
 """ """
  
   
 SUMRM_COMMENT = """# This is the configuration file for the sum_rm program. It was auto-generated by the DRMS master configure script. SUMRM_COMMENT = """# This is the configuration file for the sum_rm program. It was auto-generated by the DRMS master configure script.
 # It controls the behavior of the sum_rm program, and is loaded each time sum_rm runs. To change the # It controls the behavior of the sum_rm program, and is loaded each time sum_rm runs. To change the
 # parameter values in this configuration file, modify config.local, then re-run configure. This configuration # parameter values in this configuration file, modify config.local, then re-run configure. This configuration
Line 545  def parseConfig(fin, keymap, addenda, de
Line 556  def parseConfig(fin, keymap, addenda, de
                     # Must parse xml and use the project-specific information to populate the Rules.mk and target.mk files.                     # Must parse xml and use the project-specific information to populate the Rules.mk and target.mk files.
                     # Collect all xml lines for now, then process after file-read loop.                     # Collect all xml lines for now, then process after file-read loop.
                     if xml is None:                     if xml is None:
                         xml = line                          # The first time through this section, line is the config.local div, __PROJ__. Discard that.
                           xml = ''
                           continue
                     else:                     else:
                         xml += line                         xml += line
                 else:                 else:
Line 812  def writeParamsFiles(base, cfile, mfile,
Line 825  def writeParamsFiles(base, cfile, mfile,
             print(PY_FXNS_A, file=pyout, end='')             print(PY_FXNS_A, file=pyout, end='')
             print(''.join(pyInitSection), file=pyout)             print(''.join(pyInitSection), file=pyout)
             print(PY_FXNS_B, file=pyout)             print(PY_FXNS_B, file=pyout)
               print(PY_FXNS_C, file=pyout)
  
     except IOError as exc:     except IOError as exc:
         type, value, traceback = sys.exc_info()         type, value, traceback = sys.exc_info()


Legend:
Removed from v.1.19  
changed lines
  Added in v.1.24

Karen Tian
Powered by
ViewCVS 0.9.4