예제 #1
0
import inspect

def __LINE__():
    try:
        raise Exception
    except:
        return sys.exc_info()[2].tb_frame.f_back.f_lineno

def __FILE__():
    fnA = os.path.split(inspect.currentframe().f_code.co_filename)
    return fnA[1]

#print ("file: '%s', line: %d" % (__FILE__(), __LINE__()), file=sys.stderr)

logger = config_logger()

def syshost():
  """
  Find a default system host name.  Return 2nd name after the dot, unless there is only one, then return first name.
  """
  hostA = platform.node().split('.')
  idx = 1 
  if (len(hostA) < 2):
    idx = 0
  return hostA[idx]

class CmdLineOptions(object):
  """ Command line Options class """

  def __init__(self):
예제 #2
0
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free
# Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA
#-----------------------------------------------------------------------

from __future__ import print_function
import os, sys, time, platform

dirNm, execName = os.path.split(os.path.realpath(sys.argv[0]))
sys.path.insert(1,os.path.realpath(os.path.join(dirNm, "../libexec")))
sys.path.insert(1,os.path.realpath(os.path.join(dirNm, "../site")))

from xalt_util  import config_logger, extract_compiler

logger = config_logger()

def print_assembly(uuid, fn, version, syshost, compiler, full_path_cmplr, epochStr):
  """
  Build the XALT assembly code

  @param uuid:     UUID string
  @param fn:       The output file name
  @param version:  Current XALT version
  @param syshost:  System name (darter, stampede), not login1.stampede.tacc.utexas.edu
  @param compiler: the name of the linking compiler
  @param full_path_cmplr: full_path to compiler.
  @param epochStr: Current Timestamp
  """
  user    = os.environ.get("USER","unknown")
  osName  = platform.system() + "_%_%_" + platform.release()