mirror of
https://github.com/python/cpython.git
synced 2025-11-03 03:22:27 +00:00
Record the value of $TEXINPUTS in the transcript.
Job.message(): New method. Takes care of writing a message to the user and adding it to the transcript.
This commit is contained in:
parent
d8ee0e6ca5
commit
aaa0d9a3a4
1 changed files with 12 additions and 6 deletions
|
|
@ -214,6 +214,7 @@ class Job:
|
||||||
def setup_texinputs(self):
|
def setup_texinputs(self):
|
||||||
texinputs = [self.filedir] + list(self.options.base_texinputs)
|
texinputs = [self.filedir] + list(self.options.base_texinputs)
|
||||||
os.environ["TEXINPUTS"] = string.join(texinputs, os.pathsep)
|
os.environ["TEXINPUTS"] = string.join(texinputs, os.pathsep)
|
||||||
|
self.message("TEXINPUTS=" + os.environ["TEXINPUTS"])
|
||||||
|
|
||||||
__have_temps = 0
|
__have_temps = 0
|
||||||
def build_aux(self, binary=None):
|
def build_aux(self, binary=None):
|
||||||
|
|
@ -352,18 +353,23 @@ class Job:
|
||||||
os.unlink(self.l2h_aux_init_file)
|
os.unlink(self.l2h_aux_init_file)
|
||||||
|
|
||||||
def run(self, command):
|
def run(self, command):
|
||||||
if not self.options.quiet:
|
self.message(command)
|
||||||
print "+++", command
|
rc = os.system("(%s) </dev/null >>%s 2>&1"
|
||||||
fp = open(self.log_filename, "a")
|
% (command, self.log_filename))
|
||||||
fp.write("+++ %s\n" % command)
|
|
||||||
fp.close()
|
|
||||||
rc = os.system("(%s) >>%s 2>&1" % (command, self.log_filename))
|
|
||||||
if rc:
|
if rc:
|
||||||
sys.stderr.write(
|
sys.stderr.write(
|
||||||
"Session transcript and error messages are in %s.\n"
|
"Session transcript and error messages are in %s.\n"
|
||||||
% self.log_filename)
|
% self.log_filename)
|
||||||
sys.exit(rc)
|
sys.exit(rc)
|
||||||
|
|
||||||
|
def message(self, msg):
|
||||||
|
msg = "+++ " + msg
|
||||||
|
if not self.options.quiet:
|
||||||
|
print msg
|
||||||
|
fp = open(self.log_filename, "a")
|
||||||
|
fp.write(msg + "\n")
|
||||||
|
fp.close()
|
||||||
|
|
||||||
|
|
||||||
def safe_unlink(path):
|
def safe_unlink(path):
|
||||||
try:
|
try:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue