[Python-checkins] CVS: python/dist/src/Doc/tools mkhowto,1.27,1.28

Fred L. Drake fdrake@users.sourceforge.net
2001年7月17日 07:46:11 -0700


Update of /cvsroot/python/python/dist/src/Doc/tools
In directory usw-pr-cvs1:/tmp/cvs-serv21180/tools
Modified Files:
	mkhowto 
Log Message:
Job.__init__(): Only create the builddir directory if it will be used (by
 building the HTML or text documentation). There is no need to create
 it for other formats.
Job.build_html(): The builddir parameter is always passed in, so it need
 not be optional.
Index: mkhowto
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/tools/mkhowto,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -r1.27 -r1.28
*** mkhowto	2001年06月23日 03:06:01	1.27
--- mkhowto	2001年07月17日 14:46:09	1.28
***************
*** 228,234 ****
 self.filedir, self.doc = split_pathname(path)
 self.builddir = os.path.abspath(options.builddir or self.doc)
! if not os.path.exists(self.builddir):
! os.mkdir(self.builddir)
! self.log_filename = os.path.join(self.builddir, self.doc + ".how")
 if os.path.exists(self.log_filename):
 os.unlink(self.log_filename)
--- 228,237 ----
 self.filedir, self.doc = split_pathname(path)
 self.builddir = os.path.abspath(options.builddir or self.doc)
! if ("html" in options.formats or "text" in options.formats):
! if not os.path.exists(self.builddir):
! os.mkdir(self.builddir)
! self.log_filename = os.path.join(self.builddir, self.doc + ".how")
! else:
! self.log_filename = os.path.abspath(self.doc + ".how")
 if os.path.exists(self.log_filename):
 os.unlink(self.log_filename)
***************
*** 351,357 ****
 self.run("%s -N0 -o %s.ps %s" % (DVIPS_BINARY, self.doc, self.doc))
 
! def build_html(self, builddir=None, max_split_depth=None):
! if builddir is None:
! builddir = self.builddir
 if max_split_depth is None:
 max_split_depth = self.options.max_split_depth
--- 354,358 ----
 self.run("%s -N0 -o %s.ps %s" % (DVIPS_BINARY, self.doc, self.doc))
 
! def build_html(self, builddir, max_split_depth=None):
 if max_split_depth is None:
 max_split_depth = self.options.max_split_depth

AltStyle によって変換されたページ (->オリジナル) /