[Python-checkins] CVS: distutils/distutils cmd.py,1.26,1.27 cygwinccompiler.py,1.10,1.11 extension.py,1.7,1.8 version.py,1.4,1.5
A.M. Kuchling
akuchling@users.sourceforge.net
Wed, 21 Mar 2001 19:48:33 -0800
Update of /cvsroot/python/distutils/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv3995
Modified Files:
cmd.py cygwinccompiler.py extension.py version.py
Log Message:
Back out conversion to string methods; the Distutils is intended to work
with 1.5.2
Index: cmd.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/cmd.py,v
retrieving revision 1.26
retrieving revision 1.27
diff -C2 -r1.26 -r1.27
*** cmd.py 2001/02/09 11:15:58 1.26
--- cmd.py 2001/03/22 03:48:31 1.27
***************
*** 10,14 ****
__revision__ = "$Id$"
! import sys, os, re
from types import *
from distutils.errors import *
--- 10,14 ----
__revision__ = "$Id$"
! import sys, os, string, re
from types import *
from distutils.errors import *
***************
*** 162,166 ****
indent = indent + " "
for (option, _, _) in self.user_options:
! option = option.translate(longopt_xlate)
if option[-1] == "=":
option = option[:-1]
--- 162,166 ----
indent = indent + " "
for (option, _, _) in self.user_options:
! option = string.translate(option, longopt_xlate)
if option[-1] == "=":
option = option[:-1]
***************
*** 422,426 ****
if exec_msg is None:
exec_msg = "generating %s from %s" % \
! (outfile, ', '.join(infiles))
if skip_msg is None:
skip_msg = "skipping %s (inputs unchanged)" % outfile
--- 422,426 ----
if exec_msg is None:
exec_msg = "generating %s from %s" % \
! (outfile, string.join(infiles, ', '))
if skip_msg is None:
skip_msg = "skipping %s (inputs unchanged)" % outfile
Index: cygwinccompiler.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/cygwinccompiler.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -r1.10 -r1.11
*** cygwinccompiler.py 2001/02/09 12:14:02 1.10
--- cygwinccompiler.py 2001/03/22 03:48:31 1.11
***************
*** 366,373 ****
from distutils import sysconfig
! import sys
# if sys.version contains GCC then python was compiled with
# GCC, and the config.h file should be OK
! if sys.version.find("GCC") >= 0:
return (CONFIG_H_OK, "sys.version mentions 'GCC'")
--- 366,373 ----
from distutils import sysconfig
! import string,sys
# if sys.version contains GCC then python was compiled with
# GCC, and the config.h file should be OK
! if string.find(sys.version,"GCC") >= 0:
return (CONFIG_H_OK, "sys.version mentions 'GCC'")
***************
*** 388,392 ****
else:
# "config.h" contains an "#ifdef __GNUC__" or something similar
! if s.find("__GNUC__") >= 0:
return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn)
else:
--- 388,392 ----
else:
# "config.h" contains an "#ifdef __GNUC__" or something similar
! if string.find(s,"__GNUC__") >= 0:
return (CONFIG_H_OK, "'%s' mentions '__GNUC__'" % fn)
else:
Index: extension.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/extension.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** extension.py 2001/02/09 12:20:51 1.7
--- extension.py 2001/03/22 03:48:31 1.8
***************
*** 8,12 ****
__revision__ = "$Id$"
! import os
from types import *
--- 8,12 ----
__revision__ = "$Id$"
! import os, string
from types import *
***************
*** 169,173 ****
ext.include_dirs.append(value)
elif switch == "-D":
! equals = value.find("=")
if equals == -1: # bare "-DFOO" -- no value
ext.define_macros.append((value, None))
--- 169,173 ----
ext.include_dirs.append(value)
elif switch == "-D":
! equals = string.find(value, "=")
if equals == -1: # bare "-DFOO" -- no value
ext.define_macros.append((value, None))
Index: version.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/version.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** version.py 2001/02/09 12:19:54 1.4
--- version.py 2001/03/22 03:48:31 1.5
***************
*** 113,122 ****
if patch:
! self.version = tuple(map(int, [major, minor, patch]))
else:
! self.version = tuple(map(int, [major, minor]) + [0])
if prerelease:
! self.prerelease = (prerelease[0], int(prerelease_num))
else:
self.prerelease = None
--- 113,122 ----
if patch:
! self.version = tuple(map(string.atoi, [major, minor, patch]))
else:
! self.version = tuple(map(string.atoi, [major, minor]) + [0])
if prerelease:
! self.prerelease = (prerelease[0], string.atoi(prerelease_num))
else:
self.prerelease = None
***************
*** 126,132 ****
if self.version[2] == 0:
! vstring = '.'.join(map(str, self.version[0:2]))
else:
! vstring = '.'.join(map(str, self.version))
if self.prerelease:
--- 126,132 ----
if self.version[2] == 0:
! vstring = string.join(map(str, self.version[0:2]), '.')
else:
! vstring = string.join(map(str, self.version), '.')
if self.prerelease: