[Python-checkins] python/dist/src/Lib/distutils util.py,1.71,1.72
lemburg@users.sourceforge.net
lemburg@users.sourceforge.net
Tue, 03 Dec 2002 00:45:14 -0800
Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory sc8-pr-cvs1:/tmp/cvs-serv14903
Modified Files:
util.py
Log Message:
Adding Python <= 2.2 support back in.
Index: util.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/util.py,v
retrieving revision 1.71
retrieving revision 1.72
diff -C2 -d -r1.71 -r1.72
*** util.py 14 Nov 2002 02:25:42 -0000 1.71
--- util.py 3 Dec 2002 08:45:11 -0000 1.72
***************
*** 360,368 ****
# run it with the appropriate flags.
if not direct:
! from tempfile import mkstemp
! (script_fd, script_name) = mkstemp(".py")
log.info("writing byte-compilation script '%s'", script_name)
if not dry_run:
! script = os.fdopen(script_fd, "w")
script.write("""\
--- 360,375 ----
# run it with the appropriate flags.
if not direct:
! try:
! from tempfile import mkstemp
! (script_fd, script_name) = mkstemp(".py")
! except ImportError:
! from tempfile import mktemp
! (script_fd, script_name) = None, mktemp(".py")
log.info("writing byte-compilation script '%s'", script_name)
if not dry_run:
! if script_fd is not None:
! script = os.fdopen(script_fd, "w")
! else:
! script = open(script_name, "w")
script.write("""\