[Python-checkins] CVS: python/dist/src/Lib/distutils archive_util.py,1.10,1.11 bcppcompiler.py,1.10,1.11 ccompiler.py,1.40,1.41 cmd.py,1.28,1.29 core.py,1.46,1.47 cygwinccompiler.py,1.13,1.14 dep_util.py,1.2,1.3 dir_util.py,1.7,1.8 dist.py,1.52,1.53 extension.py,1.8,1.9 fancy_getopt.py,1.19,1.20 file_util.py,1.10,1.11 filelist.py,1.8,1.9 msvccompiler.py,1.42,1.43 mwerkscompiler.py,1.5,1.6 spawn.py,1.10,1.11 sysconfig.py,1.43,1.44 text_file.py,1.13,1.14 unixccompiler.py,1.36,1.37 util.py,1.64,1.65 version.py,1.5,1.6
Fred L. Drake
fdrake@users.sourceforge.net
Thu, 06 Dec 2001 12:51:37 -0800
- Previous message: [Python-checkins] CVS: python/dist/src/Lib/distutils dist.py,1.51,1.52
- Next message: [Python-checkins] CVS: python/dist/src/Lib/distutils/command config.py,1.9,1.10 bdist.py,1.20,1.21 bdist_rpm.py,1.26,1.27 bdist_wininst.py,1.24,1.25 sdist.py,1.52,1.53 install_headers.py,1.7,1.8 install_lib.py,1.37,1.38 install.py,1.59,1.60
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib/distutils
In directory usw-pr-cvs1:/tmp/cvs-serv25182
Modified Files:
archive_util.py bcppcompiler.py ccompiler.py cmd.py core.py
cygwinccompiler.py dep_util.py dir_util.py dist.py
extension.py fancy_getopt.py file_util.py filelist.py
msvccompiler.py mwerkscompiler.py spawn.py sysconfig.py
text_file.py unixccompiler.py util.py version.py
Log Message:
Whitespace normalization.
Index: archive_util.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/archive_util.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** archive_util.py 2001/04/14 16:17:00 1.10
--- archive_util.py 2001/12/06 20:51:35 1.11
***************
*** 32,36 ****
'bzip2': '.bz2',
'compress': ".Z" }
!
# flags for compression program, each element of list will be an argument
compress_flags = {'gzip': ["-f9"],
--- 32,36 ----
'bzip2': '.bz2',
'compress': ".Z" }
!
# flags for compression program, each element of list will be an argument
compress_flags = {'gzip': ["-f9"],
***************
*** 86,90 ****
except ImportError:
raise DistutilsExecError, \
! ("unable to create zip file '%s': " +
"could neither find a standalone zip utility nor " +
"import the 'zipfile' module") % zip_filename
--- 86,90 ----
except ImportError:
raise DistutilsExecError, \
! ("unable to create zip file '%s': " +
"could neither find a standalone zip utility nor " +
"import the 'zipfile' module") % zip_filename
***************
*** 153,157 ****
kwargs = { 'verbose': verbose,
'dry_run': dry_run }
!
try:
format_info = ARCHIVE_FORMATS[format]
--- 153,157 ----
kwargs = { 'verbose': verbose,
'dry_run': dry_run }
!
try:
format_info = ARCHIVE_FORMATS[format]
Index: bcppcompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/bcppcompiler.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** bcppcompiler.py 2001/08/16 20:17:41 1.10
--- bcppcompiler.py 2001/12/06 20:51:35 1.11
***************
*** 103,107 ****
else:
compile_opts.extend (self.compile_options)
!
for i in range (len (sources)):
src = sources[i] ; obj = objects[i]
--- 103,107 ----
else:
compile_opts.extend (self.compile_options)
!
for i in range (len (sources)):
src = sources[i] ; obj = objects[i]
***************
*** 131,139 ****
elif ext in self._cpp_extensions:
input_opt = "-P"
! else:
# Unknown file type -- no extra options. The compiler
# will probably fail, but let it just in case this is a
# file the compiler recognizes even if we don't.
! input_opt = ""
output_opt = "-o" + obj
--- 131,139 ----
elif ext in self._cpp_extensions:
input_opt = "-P"
! else:
# Unknown file type -- no extra options. The compiler
# will probably fail, but let it just in case this is a
# file the compiler recognizes even if we don't.
! input_opt = ""
output_opt = "-o" + obj
***************
*** 175,189 ****
lib_args.extend (extra_postargs)
try:
! self.spawn ([self.lib] + lib_args)
except DistutilsExecError, msg:
! raise LibError, msg
else:
self.announce ("skipping %s (up-to-date)" % output_filename)
# create_static_lib ()
!
!
def link (self,
! target_desc,
objects,
output_filename,
--- 175,189 ----
lib_args.extend (extra_postargs)
try:
! self.spawn ([self.lib] + lib_args)
except DistutilsExecError, msg:
! raise LibError, msg
else:
self.announce ("skipping %s (up-to-date)" % output_filename)
# create_static_lib ()
!
!
def link (self,
! target_desc,
objects,
output_filename,
***************
*** 255,266 ****
else:
objects.append(file)
!
!
for l in library_dirs:
! ld_args.append("/L%s" % os.path.normpath(l))
ld_args.append("/L.") # we sometimes use relative paths
! # list of object files
! ld_args.extend(objects)
# XXX the command-line syntax for Borland C++ is a bit wonky;
--- 255,266 ----
else:
objects.append(file)
!
!
for l in library_dirs:
! ld_args.append("/L%s" % os.path.normpath(l))
ld_args.append("/L.") # we sometimes use relative paths
! # list of object files
! ld_args.extend(objects)
# XXX the command-line syntax for Borland C++ is a bit wonky;
***************
*** 276,284 ****
# name of dll/exe file
ld_args.extend([',',output_filename])
! # no map file and start libraries
ld_args.append(',,')
for lib in libraries:
! # see if we find it and if there is a bcpp specific lib
# (xxx_bcpp.lib)
libfile = self.find_library_file(library_dirs, lib, debug)
--- 276,284 ----
# name of dll/exe file
ld_args.extend([',',output_filename])
! # no map file and start libraries
ld_args.append(',,')
for lib in libraries:
! # see if we find it and if there is a bcpp specific lib
# (xxx_bcpp.lib)
libfile = self.find_library_file(library_dirs, lib, debug)
***************
*** 301,305 ****
ld_args.extend(resources)
!
if extra_preargs:
ld_args[:0] = extra_preargs
--- 301,305 ----
ld_args.extend(resources)
!
if extra_preargs:
ld_args[:0] = extra_preargs
Index: ccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/ccompiler.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -C2 -d -r1.40 -r1.41
*** ccompiler.py 2001/08/27 15:08:16 1.40
--- ccompiler.py 2001/12/06 20:51:35 1.41
***************
*** 62,66 ****
# think this is useless without the ability to null out the
# library search path anyways.
!
# Subclasses that rely on the standard filename generation methods
--- 62,66 ----
# think this is useless without the ability to null out the
# library search path anyways.
!
# Subclasses that rely on the standard filename generation methods
***************
*** 160,166 ****
else:
setattr(self, key, value)
-
def _find_macro (self, name):
i = 0
--- 160,166 ----
else:
setattr(self, key, value)
+
def _find_macro (self, name):
i = 0
***************
*** 353,357 ****
raise TypeError, \
"'include_dirs' (if supplied) must be a list of strings"
!
return (output_dir, macros, include_dirs)
--- 353,357 ----
raise TypeError, \
"'include_dirs' (if supplied) must be a list of strings"
!
return (output_dir, macros, include_dirs)
***************
*** 365,369 ****
files can be skipped.
"""
! # Get the list of expected output (object) files
objects = self.object_filenames (sources,
strip_dir=1,
--- 365,369 ----
files can be skipped.
"""
! # Get the list of expected output (object) files
objects = self.object_filenames (sources,
strip_dir=1,
***************
*** 402,406 ****
"'objects' must be a list or tuple of strings"
objects = list (objects)
!
if output_dir is None:
output_dir = self.output_dir
--- 402,406 ----
"'objects' must be a list or tuple of strings"
objects = list (objects)
!
if output_dir is None:
output_dir = self.output_dir
***************
*** 561,566 ****
"""
pass
-
# values for target_desc parameter in link()
SHARED_OBJECT = "shared_object"
--- 561,566 ----
"""
pass
+
# values for target_desc parameter in link()
SHARED_OBJECT = "shared_object"
***************
*** 622,626 ****
raise NotImplementedError
!
# Old 'link_*()' methods, rewritten to use the new 'link()' method.
--- 622,626 ----
raise NotImplementedError
!
# Old 'link_*()' methods, rewritten to use the new 'link()' method.
***************
*** 637,641 ****
extra_postargs=None,
build_temp=None):
! self.link(CCompiler.SHARED_LIBRARY, objects,
self.library_filename(output_libname, lib_type='shared'),
output_dir,
--- 637,641 ----
extra_postargs=None,
build_temp=None):
! self.link(CCompiler.SHARED_LIBRARY, objects,
self.library_filename(output_libname, lib_type='shared'),
output_dir,
***************
*** 643,648 ****
export_symbols, debug,
extra_preargs, extra_postargs, build_temp)
-
def link_shared_object (self,
objects,
--- 643,648 ----
export_symbols, debug,
extra_preargs, extra_postargs, build_temp)
+
def link_shared_object (self,
objects,
***************
*** 674,680 ****
extra_preargs=None,
extra_postargs=None):
! self.link(CCompiler.EXECUTABLE, objects,
self.executable_filename(output_progname), output_dir,
! libraries, library_dirs, runtime_library_dirs, None,
debug, extra_preargs, extra_postargs, None)
--- 674,680 ----
extra_preargs=None,
extra_postargs=None):
! self.link(CCompiler.EXECUTABLE, objects,
self.executable_filename(output_progname), output_dir,
! libraries, library_dirs, runtime_library_dirs, None,
debug, extra_preargs, extra_postargs, None)
***************
*** 847,856 ****
# compiler
('cygwin.*', 'unix'),
!
# OS name mappings
('posix', 'unix'),
('nt', 'msvc'),
('mac', 'mwerks'),
!
)
--- 847,856 ----
# compiler
('cygwin.*', 'unix'),
!
# OS name mappings
('posix', 'unix'),
('nt', 'msvc'),
('mac', 'mwerks'),
!
)
***************
*** 902,906 ****
# "--compiler", which just happens to be the case for the three
# commands that use it.
! from distutils.fancy_getopt import FancyGetopt
compilers = []
for compiler in compiler_class.keys():
--- 902,906 ----
# "--compiler", which just happens to be the case for the three
# commands that use it.
! from distutils.fancy_getopt import FancyGetopt
compilers = []
for compiler in compiler_class.keys():
***************
*** 910,914 ****
pretty_printer = FancyGetopt(compilers)
pretty_printer.print_help("List of available compilers:")
!
def new_compiler (plat=None,
--- 910,914 ----
pretty_printer = FancyGetopt(compilers)
pretty_printer.print_help("List of available compilers:")
!
def new_compiler (plat=None,
***************
*** 933,937 ****
if compiler is None:
compiler = get_default_compiler(plat)
!
(module_name, class_name, long_description) = compiler_class[compiler]
except KeyError:
--- 933,937 ----
if compiler is None:
compiler = get_default_compiler(plat)
!
(module_name, class_name, long_description) = compiler_class[compiler]
except KeyError:
***************
*** 940,944 ****
msg = msg + " with '%s' compiler" % compiler
raise DistutilsPlatformError, msg
!
try:
module_name = "distutils." + module_name
--- 940,944 ----
msg = msg + " with '%s' compiler" % compiler
raise DistutilsPlatformError, msg
!
try:
module_name = "distutils." + module_name
Index: cmd.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/cmd.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** cmd.py 2001/08/29 23:57:22 1.28
--- cmd.py 2001/12/06 20:51:35 1.29
***************
*** 42,46 ****
# we have any C header files to install.) If 'predicate' is None,
# that command is always applicable.
! #
# 'sub_commands' is usually defined at the *end* of a class, because
# predicates can be unbound methods, so they must already have been
--- 42,46 ----
# we have any C header files to install.) If 'predicate' is None,
# that command is always applicable.
! #
# 'sub_commands' is usually defined at the *end* of a class, because
# predicates can be unbound methods, so they must already have been
***************
*** 112,117 ****
self.finalize_options()
self.finalized = 1
-
# Subclasses must define:
# initialize_options()
--- 112,117 ----
self.finalize_options()
self.finalized = 1
+
# Subclasses must define:
# initialize_options()
***************
*** 134,143 ****
between options; generally, 'initialize_options()' implementations
are just a bunch of "self.foo = None" assignments.
!
This method must be implemented by all command classes.
"""
raise RuntimeError, \
"abstract method -- subclass %s must override" % self.__class__
!
def finalize_options (self):
"""Set final values for all the options that this command supports.
--- 134,143 ----
between options; generally, 'initialize_options()' implementations
are just a bunch of "self.foo = None" assignments.
!
This method must be implemented by all command classes.
"""
raise RuntimeError, \
"abstract method -- subclass %s must override" % self.__class__
!
def finalize_options (self):
"""Set final values for all the options that this command supports.
***************
*** 199,208 ****
print msg
sys.stdout.flush()
!
# -- Option validation methods -------------------------------------
# (these are very handy in writing the 'finalize_options()' method)
! #
# NB. the general philosophy here is to ensure that a particular option
# value meets certain type and value constraints. If not, we try to
--- 199,208 ----
print msg
sys.stdout.flush()
!
# -- Option validation methods -------------------------------------
# (these are very handy in writing the 'finalize_options()' method)
! #
# NB. the general philosophy here is to ensure that a particular option
# value meets certain type and value constraints. If not, we try to
***************
*** 253,257 ****
"'%s' must be a list of strings (got %s)" % \
(option, `val`)
!
def _ensure_tested_string (self, option, tester,
what, error_fmt, default=None):
--- 253,257 ----
"'%s' must be a list of strings (got %s)" % \
(option, `val`)
!
def _ensure_tested_string (self, option, tester,
what, error_fmt, default=None):
***************
*** 383,387 ****
"""
return dir_util.copy_tree(
! infile, outfile,
preserve_mode,preserve_times,preserve_symlinks,
not self.force,
--- 383,387 ----
"""
return dir_util.copy_tree(
! infile, outfile,
preserve_mode,preserve_times,preserve_symlinks,
not self.force,
***************
*** 427,431 ****
if skip_msg is None:
skip_msg = "skipping %s (inputs unchanged)" % outfile
!
# Allow 'infiles' to be a single string
--- 427,431 ----
if skip_msg is None:
skip_msg = "skipping %s (inputs unchanged)" % outfile
!
# Allow 'infiles' to be a single string
***************
*** 460,464 ****
Currently used by install_data and install_scripts.
"""
!
user_options = [('install-dir=', 'd', "directory to install the files to")]
--- 460,464 ----
Currently used by install_data and install_scripts.
"""
!
user_options = [('install-dir=', 'd', "directory to install the files to")]
Index: core.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/core.py,v
retrieving revision 1.46
retrieving revision 1.47
diff -C2 -d -r1.46 -r1.47
*** core.py 2000/09/26 01:48:44 1.46
--- core.py 2001/12/06 20:51:35 1.47
***************
*** 109,113 ****
# the setup script, but be overridden by the command line.
dist.parse_config_files()
!
if DEBUG:
print "options (after parsing config files):"
--- 109,113 ----
# the setup script, but be overridden by the command line.
dist.parse_config_files()
!
if DEBUG:
print "options (after parsing config files):"
***************
*** 147,151 ****
else:
raise SystemExit, error
!
except (DistutilsExecError,
DistutilsFileError,
--- 147,151 ----
else:
raise SystemExit, error
!
except (DistutilsExecError,
DistutilsFileError,
Index: cygwinccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/cygwinccompiler.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** cygwinccompiler.py 2001/07/26 13:41:05 1.13
--- cygwinccompiler.py 2001/12/06 20:51:35 1.14
***************
*** 19,23 ****
# see also http://starship.python.net/crew/kernr/mingw32/Notes.html
#
! # * We put export_symbols in a def-file, and don't use
# --export-all-symbols because it doesn't worked reliable in some
# tested configurations. And because other windows compilers also
--- 19,23 ----
# see also http://starship.python.net/crew/kernr/mingw32/Notes.html
#
! # * We put export_symbols in a def-file, and don't use
# --export-all-symbols because it doesn't worked reliable in some
# tested configurations. And because other windows compilers also
***************
*** 25,44 ****
#
# tested configurations:
! #
! # * cygwin gcc 2.91.57/ld 2.9.4/dllwrap 0.2.4 works
# (after patching python's config.h and for C++ some other include files)
# see also http://starship.python.net/crew/kernr/mingw32/Notes.html
! # * mingw32 gcc 2.95.2/ld 2.9.4/dllwrap 0.2.4 works
! # (ld doesn't support -shared, so we use dllwrap)
# * cygwin gcc 2.95.2/ld 2.10.90/dllwrap 2.10.90 works now
# - its dllwrap doesn't work, there is a bug in binutils 2.10.90
# see also http://sources.redhat.com/ml/cygwin/2000-06/msg01274.html
! # - using gcc -mdll instead dllwrap doesn't work without -static because
# it tries to link against dlls instead their import libraries. (If
# it finds the dll first.)
! # By specifying -static we force ld to link against the import libraries,
! # this is windows standard and there are normally not the necessary symbols
# in the dlls.
! # *** only the version of June 2000 shows these problems
# created 2000/05/05, Rene Liebscher
--- 25,44 ----
#
# tested configurations:
! #
! # * cygwin gcc 2.91.57/ld 2.9.4/dllwrap 0.2.4 works
# (after patching python's config.h and for C++ some other include files)
# see also http://starship.python.net/crew/kernr/mingw32/Notes.html
! # * mingw32 gcc 2.95.2/ld 2.9.4/dllwrap 0.2.4 works
! # (ld doesn't support -shared, so we use dllwrap)
# * cygwin gcc 2.95.2/ld 2.10.90/dllwrap 2.10.90 works now
# - its dllwrap doesn't work, there is a bug in binutils 2.10.90
# see also http://sources.redhat.com/ml/cygwin/2000-06/msg01274.html
! # - using gcc -mdll instead dllwrap doesn't work without -static because
# it tries to link against dlls instead their import libraries. (If
# it finds the dll first.)
! # By specifying -static we force ld to link against the import libraries,
! # this is windows standard and there are normally not the necessary symbols
# in the dlls.
! # *** only the version of June 2000 shows these problems
# created 2000/05/05, Rene Liebscher
***************
*** 61,65 ****
shared_lib_format = "%s%s"
exe_extension = ".exe"
!
def __init__ (self,
verbose=0,
--- 61,65 ----
shared_lib_format = "%s%s"
exe_extension = ".exe"
!
def __init__ (self,
verbose=0,
***************
*** 77,94 ****
("Reason: %s." % details) +
"Compiling may fail because of undefined preprocessor macros.")
!
(self.gcc_version, self.ld_version, self.dllwrap_version) = \
get_versions()
self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" %
! (self.gcc_version,
! self.ld_version,
self.dllwrap_version) )
! # ld_version >= "2.10.90" should also be able to use
# gcc -mdll instead of dllwrap
! # Older dllwraps had own version numbers, newer ones use the
# same as the rest of binutils ( also ld )
# dllwrap 2.10.90 is buggy
! if self.ld_version >= "2.10.90":
self.linker_dll = "gcc"
else:
--- 77,94 ----
("Reason: %s." % details) +
"Compiling may fail because of undefined preprocessor macros.")
!
(self.gcc_version, self.ld_version, self.dllwrap_version) = \
get_versions()
self.debug_print(self.compiler_type + ": gcc %s, ld %s, dllwrap %s\n" %
! (self.gcc_version,
! self.ld_version,
self.dllwrap_version) )
! # ld_version >= "2.10.90" should also be able to use
# gcc -mdll instead of dllwrap
! # Older dllwraps had own version numbers, newer ones use the
# same as the rest of binutils ( also ld )
# dllwrap 2.10.90 is buggy
! if self.ld_version >= "2.10.90":
self.linker_dll = "gcc"
else:
***************
*** 103,116 ****
self.linker_dll))
! # cygwin and mingw32 need different sets of libraries
if self.gcc_version == "2.91.57":
# cygwin shouldn't need msvcrt, but without the dlls will crash
# (gcc version 2.91.57) -- perhaps something about initialization
self.dll_libraries=["msvcrt"]
! self.warn(
"Consider upgrading to a newer version of gcc")
else:
self.dll_libraries=[]
!
# __init__ ()
--- 103,116 ----
self.linker_dll))
! # cygwin and mingw32 need different sets of libraries
if self.gcc_version == "2.91.57":
# cygwin shouldn't need msvcrt, but without the dlls will crash
# (gcc version 2.91.57) -- perhaps something about initialization
self.dll_libraries=["msvcrt"]
! self.warn(
"Consider upgrading to a newer version of gcc")
else:
self.dll_libraries=[]
!
# __init__ ()
***************
*** 118,122 ****
# but we have to insert some lines in the middle of it, so
# we put here a adapted version of it.
! # (If we would call compile() in the base class, it would do some
# initializations a second time, this is why all is done here.)
def compile (self,
--- 118,122 ----
# but we have to insert some lines in the middle of it, so
# we put here a adapted version of it.
! # (If we would call compile() in the base class, it would do some
# initializations a second time, this is why all is done here.)
def compile (self,
***************
*** 144,148 ****
# Compile all source files that weren't eliminated by
! # '_prep_compile()'.
for i in range (len (sources)):
src = sources[i] ; obj = objects[i]
--- 144,148 ----
# Compile all source files that weren't eliminated by
! # '_prep_compile()'.
for i in range (len (sources)):
src = sources[i] ; obj = objects[i]
***************
*** 158,162 ****
except DistutilsExecError, msg:
raise CompileError, msg
! else: # for other files use the C-compiler
try:
self.spawn (self.compiler_so + cc_args +
--- 158,162 ----
except DistutilsExecError, msg:
raise CompileError, msg
! else: # for other files use the C-compiler
try:
self.spawn (self.compiler_so + cc_args +
***************
*** 185,194 ****
extra_postargs=None,
build_temp=None):
!
# use separate copies, so we can modify the lists
extra_preargs = copy.copy(extra_preargs or [])
libraries = copy.copy(libraries or [])
objects = copy.copy(objects or [])
!
# Additional libraries
libraries.extend(self.dll_libraries)
--- 185,194 ----
extra_postargs=None,
build_temp=None):
!
# use separate copies, so we can modify the lists
extra_preargs = copy.copy(extra_preargs or [])
libraries = copy.copy(libraries or [])
objects = copy.copy(objects or [])
!
# Additional libraries
libraries.extend(self.dll_libraries)
***************
*** 200,207 ****
# (The linker doesn't do anything if output is up-to-date.
# So it would probably better to check if we really need this,
! # but for this we had to insert some unchanged parts of
! # UnixCCompiler, and this is not what we want.)
! # we want to put some files in the same directory as the
# object files are, build_temp doesn't help much
# where are the object files
--- 200,207 ----
# (The linker doesn't do anything if output is up-to-date.
# So it would probably better to check if we really need this,
! # but for this we had to insert some unchanged parts of
! # UnixCCompiler, and this is not what we want.)
! # we want to put some files in the same directory as the
# object files are, build_temp doesn't help much
# where are the object files
***************
*** 215,219 ****
exp_file = os.path.join(temp_dir, dll_name + ".exp")
lib_file = os.path.join(temp_dir, 'lib' + dll_name + ".a")
!
# Generate .def file
contents = [
--- 215,219 ----
exp_file = os.path.join(temp_dir, dll_name + ".exp")
lib_file = os.path.join(temp_dir, 'lib' + dll_name + ".a")
!
# Generate .def file
contents = [
***************
*** 238,256 ****
# doesn't work: bfd_close build\...\libfoo.a: Invalid operation
#extra_preargs.extend(["-Wl,--out-implib,%s" % lib_file])
! # for gcc/ld the def-file is specified as any other object files
objects.append(def_file)
#end: if ((export_symbols is not None) and
# (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):
!
# who wants symbols and a many times larger output file
! # should explicitly switch the debug mode on
# otherwise we let dllwrap/ld strip the output file
! # (On my machine: 10KB < stripped_file < ??100KB
# unstripped_file = stripped_file + XXX KB
! # ( XXX=254 for a typical python extension))
! if not debug:
! extra_preargs.append("-s")
!
UnixCCompiler.link(self,
target_desc,
--- 238,256 ----
# doesn't work: bfd_close build\...\libfoo.a: Invalid operation
#extra_preargs.extend(["-Wl,--out-implib,%s" % lib_file])
! # for gcc/ld the def-file is specified as any other object files
objects.append(def_file)
#end: if ((export_symbols is not None) and
# (target_desc != self.EXECUTABLE or self.linker_dll == "gcc")):
!
# who wants symbols and a many times larger output file
! # should explicitly switch the debug mode on
# otherwise we let dllwrap/ld strip the output file
! # (On my machine: 10KB < stripped_file < ??100KB
# unstripped_file = stripped_file + XXX KB
! # ( XXX=254 for a typical python extension))
! if not debug:
! extra_preargs.append("-s")
!
UnixCCompiler.link(self,
target_desc,
***************
*** 266,270 ****
extra_postargs,
build_temp)
!
# link ()
--- 266,270 ----
extra_postargs,
build_temp)
!
# link ()
***************
*** 289,293 ****
if ext == '.res' or ext == '.rc':
# these need to be compiled to object files
! obj_names.append (os.path.join (output_dir,
base + ext + self.obj_extension))
else:
--- 289,293 ----
if ext == '.res' or ext == '.rc':
# these need to be compiled to object files
! obj_names.append (os.path.join (output_dir,
base + ext + self.obj_extension))
else:
***************
*** 312,316 ****
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
!
# A real mingw32 doesn't need to specify a different entry point,
# but cygwin 2.91.57 in no-cygwin-mode needs it.
--- 312,316 ----
CygwinCCompiler.__init__ (self, verbose, dry_run, force)
!
# A real mingw32 doesn't need to specify a different entry point,
# but cygwin 2.91.57 in no-cygwin-mode needs it.
***************
*** 323,335 ****
compiler_so='gcc -mno-cygwin -mdll -O -Wall',
linker_exe='gcc -mno-cygwin',
! linker_so='%s -mno-cygwin -mdll -static %s'
% (self.linker_dll, entry_point))
# Maybe we should also append -mthreads, but then the finished
# dlls need another dll (mingwm10.dll see Mingw32 docs)
! # (-mthreads: Support thread-safe exception handling on `Mingw32')
!
! # no additional libraries needed
self.dll_libraries=[]
!
# __init__ ()
--- 323,335 ----
compiler_so='gcc -mno-cygwin -mdll -O -Wall',
linker_exe='gcc -mno-cygwin',
! linker_so='%s -mno-cygwin -mdll -static %s'
% (self.linker_dll, entry_point))
# Maybe we should also append -mthreads, but then the finished
# dlls need another dll (mingwm10.dll see Mingw32 docs)
! # (-mthreads: Support thread-safe exception handling on `Mingw32')
!
! # no additional libraries needed
self.dll_libraries=[]
!
# __init__ ()
***************
*** 371,383 ****
if string.find(sys.version,"GCC") >= 0:
return (CONFIG_H_OK, "sys.version mentions 'GCC'")
!
fn = sysconfig.get_config_h_filename()
try:
# It would probably better to read single lines to search.
! # But we do this only once, and it is fast enough
f = open(fn)
s = f.read()
f.close()
!
except IOError, exc:
# if we can't read this file, we cannot say it is wrong
--- 371,383 ----
if string.find(sys.version,"GCC") >= 0:
return (CONFIG_H_OK, "sys.version mentions 'GCC'")
!
fn = sysconfig.get_config_h_filename()
try:
# It would probably better to read single lines to search.
! # But we do this only once, and it is fast enough
f = open(fn)
s = f.read()
f.close()
!
except IOError, exc:
# if we can't read this file, we cannot say it is wrong
***************
*** 402,406 ****
from distutils.spawn import find_executable
import re
!
gcc_exe = find_executable('gcc')
if gcc_exe:
--- 402,406 ----
from distutils.spawn import find_executable
import re
!
gcc_exe = find_executable('gcc')
if gcc_exe:
***************
*** 440,442 ****
dllwrap_version = None
return (gcc_version, ld_version, dllwrap_version)
-
--- 440,441 ----
Index: dep_util.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/dep_util.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** dep_util.py 2000/09/26 02:09:20 1.2
--- dep_util.py 2001/12/06 20:51:35 1.3
***************
*** 71,75 ****
if not os.path.exists(target):
return 1
!
# Otherwise we have to find out the hard way: if *any* source file
# is more recent than 'target', then 'target' is out-of-date and
--- 71,75 ----
if not os.path.exists(target):
return 1
!
# Otherwise we have to find out the hard way: if *any* source file
# is more recent than 'target', then 'target' is out-of-date and
***************
*** 81,90 ****
if not os.path.exists(source):
if missing == 'error': # blow up when we stat() the file
! pass
! elif missing == 'ignore': # missing source dropped from
continue # target's dependency list
elif missing == 'newer': # missing source means target is
return 1 # out-of-date
!
source_mtime = os.stat(source)[ST_MTIME]
if source_mtime > target_mtime:
--- 81,90 ----
if not os.path.exists(source):
if missing == 'error': # blow up when we stat() the file
! pass
! elif missing == 'ignore': # missing source dropped from
continue # target's dependency list
elif missing == 'newer': # missing source means target is
return 1 # out-of-date
!
source_mtime = os.stat(source)[ST_MTIME]
if source_mtime > target_mtime:
Index: dir_util.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/dir_util.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** dir_util.py 2000/09/30 17:47:17 1.7
--- dir_util.py 2001/12/06 20:51:35 1.8
***************
*** 50,54 ****
(head, tail) = os.path.split(name)
tails = [tail] # stack of lone dirs to create
!
while head and tail and not os.path.isdir(head):
#print "splitting '%s': " % head,
--- 50,54 ----
(head, tail) = os.path.split(name)
tails = [tail] # stack of lone dirs to create
!
while head and tail and not os.path.isdir(head):
#print "splitting '%s': " % head,
***************
*** 141,145 ****
if not dry_run and not os.path.isdir(src):
raise DistutilsFileError, \
! "cannot copy tree '%s': not a directory" % src
try:
names = os.listdir(src)
--- 141,145 ----
if not dry_run and not os.path.isdir(src):
raise DistutilsFileError, \
! "cannot copy tree '%s': not a directory" % src
try:
names = os.listdir(src)
***************
*** 167,171 ****
os.symlink(link_dest, dst_name)
outputs.append(dst_name)
!
elif os.path.isdir(src_name):
outputs.extend(
--- 167,171 ----
os.symlink(link_dest, dst_name)
outputs.append(dst_name)
!
elif os.path.isdir(src_name):
outputs.extend(
Index: dist.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/dist.py,v
retrieving revision 1.52
retrieving revision 1.53
diff -C2 -d -r1.52 -r1.53
*** dist.py 2001/12/06 20:44:19 1.52
--- dist.py 2001/12/06 20:51:35 1.53
***************
*** 98,102 ****
# -- Creation/initialization methods -------------------------------
!
def __init__ (self, attrs=None):
"""Construct a new Distribution instance: initialize all the
--- 98,102 ----
# -- Creation/initialization methods -------------------------------
!
def __init__ (self, attrs=None):
"""Construct a new Distribution instance: initialize all the
***************
*** 209,213 ****
self.finalize_options()
!
# __init__ ()
--- 209,213 ----
self.finalize_options()
!
# __init__ ()
***************
*** 252,256 ****
# dump_option_dicts ()
!
--- 252,256 ----
# dump_option_dicts ()
!
***************
*** 379,383 ****
self.script_args = EasyDialogs.GetArgv(
self.global_options + self.display_options, cmdlist)
!
# We have to parse the command line a bit at a time -- global
# options, then the first command, then its options, and so on --
--- 379,383 ----
self.script_args = EasyDialogs.GetArgv(
self.global_options + self.display_options, cmdlist)
!
# We have to parse the command line a bit at a time -- global
# options, then the first command, then its options, and so on --
***************
*** 397,401 ****
if self.handle_display_options(option_order):
return
!
while args:
args = self._parse_command_opts(parser, args)
--- 397,401 ----
if self.handle_display_options(option_order):
return
!
while args:
args = self._parse_command_opts(parser, args)
***************
*** 509,513 ****
% (`func`, help_option))
! if help_option_found:
return
--- 509,513 ----
% (`func`, help_option))
! if help_option_found:
return
***************
*** 802,806 ****
"""
from distutils.core import DEBUG
!
command_name = command_obj.get_command_name()
if option_dict is None:
--- 802,806 ----
"""
from distutils.core import DEBUG
!
command_name = command_obj.get_command_name()
if option_dict is None:
***************
*** 842,846 ****
You'll have to re-finalize the command object (by calling
'finalize_options()' or 'ensure_finalized()') before using it for
! real.
'command' should be a command name (string) or command object. If
--- 842,846 ----
You'll have to re-finalize the command object (by calling
'finalize_options()' or 'ensure_finalized()') before using it for
! real.
'command' should be a command name (string) or command object. If
***************
*** 869,877 ****
if reinit_subcommands:
for sub in command.get_sub_commands():
! self.reinitialize_command(sub, reinit_subcommands)
return command
!
# -- Methods that operate on the Distribution ----------------------
--- 869,877 ----
if reinit_subcommands:
for sub in command.get_sub_commands():
! self.reinitialize_command(sub, reinit_subcommands)
return command
!
# -- Methods that operate on the Distribution ----------------------
***************
*** 977,981 ****
self.keywords = None
self.platforms = None
!
def write_pkg_info (self, base_dir):
"""Write the PKG-INFO file into the release tree.
--- 977,981 ----
self.keywords = None
self.platforms = None
!
def write_pkg_info (self, base_dir):
"""Write the PKG-INFO file into the release tree.
***************
*** 1004,1010 ****
pkg_info.close()
!
# write_pkg_info ()
!
# -- Metadata query methods ----------------------------------------
--- 1004,1010 ----
pkg_info.close()
!
# write_pkg_info ()
!
# -- Metadata query methods ----------------------------------------
***************
*** 1046,1050 ****
return self.license or "UNKNOWN"
get_licence = get_license
!
def get_description(self):
return self.description or "UNKNOWN"
--- 1046,1050 ----
return self.license or "UNKNOWN"
get_licence = get_license
!
def get_description(self):
return self.description or "UNKNOWN"
Index: extension.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/extension.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** extension.py 2001/03/22 03:48:31 1.8
--- extension.py 2001/12/06 20:51:35 1.9
***************
*** 17,21 ****
# complex to simplify some common cases ("foo" module in "foo.c") and do
# better error-checking ("foo.c" actually exists).
! #
# Also, putting this in build_ext.py means every setup script would have to
# import that large-ish module (indirectly, through distutils.core) in
--- 17,21 ----
# complex to simplify some common cases ("foo" module in "foo.c") and do
# better error-checking ("foo.c" actually exists).
! #
# Also, putting this in build_ext.py means every setup script would have to
# import that large-ish module (indirectly, through distutils.core) in
***************
*** 212,216 ****
# 'cpp_args': cpp_args,
# 'lib_args': library_args }
!
return extensions
--- 212,216 ----
# 'cpp_args': cpp_args,
# 'lib_args': library_args }
!
return extensions
Index: fancy_getopt.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/fancy_getopt.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -C2 -d -r1.19 -r1.20
*** fancy_getopt.py 2001/08/09 20:57:46 1.19
--- fancy_getopt.py 2001/12/06 20:51:35 1.20
***************
*** 74,78 ****
# opposite of some other option
self.negative_alias = {}
!
# These keep track of the information in the option table. We
# don't actually populate these structures until we're ready to
--- 74,78 ----
# opposite of some other option
self.negative_alias = {}
!
# These keep track of the information in the option table. We
# don't actually populate these structures until we're ready to
***************
*** 91,96 ****
# __init__ ()
-
def _build_index (self):
self.option_index.clear()
--- 91,96 ----
# __init__ ()
+
def _build_index (self):
self.option_index.clear()
***************
*** 118,122 ****
def get_attr_name (self, long_option):
! """Translate long option name 'long_option' to the form it
has as an attribute of some object: ie., translate hyphens
to underscores."""
--- 118,122 ----
def get_attr_name (self, long_option):
! """Translate long option name 'long_option' to the form it
has as an attribute of some object: ie., translate hyphens
to underscores."""
***************
*** 135,139 ****
("invalid %s '%s': "
"aliased option '%s' not defined") % (what, alias, opt)
!
def set_aliases (self, alias):
"""Set the aliases for this option parser."""
--- 135,139 ----
("invalid %s '%s': "
"aliased option '%s' not defined") % (what, alias, opt)
!
def set_aliases (self, alias):
"""Set the aliases for this option parser."""
***************
*** 477,482 ****
"""
return string.translate(opt, longopt_xlate)
-
class OptionDummy:
"""Dummy class just used as a place to hold command-line option
--- 477,482 ----
"""
return string.translate(opt, longopt_xlate)
+
class OptionDummy:
"""Dummy class just used as a place to hold command-line option
***************
*** 490,494 ****
# class OptionDummy
!
if __name__ == "__main__":
--- 490,494 ----
# class OptionDummy
!
if __name__ == "__main__":
Index: file_util.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/file_util.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** file_util.py 2001/08/09 20:59:53 1.10
--- file_util.py 2001/12/06 20:51:35 1.11
***************
*** 36,40 ****
raise DistutilsFileError, \
"could not open '%s': %s" % (src, errstr)
!
try:
fdst = open(dst, 'wb')
--- 36,40 ----
raise DistutilsFileError, \
"could not open '%s': %s" % (src, errstr)
!
try:
fdst = open(dst, 'wb')
***************
*** 42,46 ****
raise DistutilsFileError, \
"could not create '%s': %s" % (dst, errstr)
!
while 1:
try:
--- 42,46 ----
raise DistutilsFileError, \
"could not create '%s': %s" % (dst, errstr)
!
while 1:
try:
***************
*** 49,53 ****
raise DistutilsFileError, \
"could not read from '%s': %s" % (src, errstr)
!
if not buf:
break
--- 49,53 ----
raise DistutilsFileError, \
"could not read from '%s': %s" % (src, errstr)
!
if not buf:
break
***************
*** 58,62 ****
raise DistutilsFileError, \
"could not write to '%s': %s" % (dst, errstr)
!
finally:
if fdst:
--- 58,62 ----
raise DistutilsFileError, \
"could not write to '%s': %s" % (dst, errstr)
!
finally:
if fdst:
***************
*** 135,139 ****
else:
print "%s %s -> %s" % (action, src, dst)
!
if dry_run:
return (dst, 1)
--- 135,139 ----
else:
print "%s %s -> %s" % (action, src, dst)
!
if dry_run:
return (dst, 1)
***************
*** 147,151 ****
raise DistutilsFileError, \
"could not copy '%s' to '%s': %s" % (src, dst, exc[-1])
!
# If linking (hard or symbolic), use the appropriate system call
# (Unix only, of course, but that's the caller's responsibility)
--- 147,151 ----
raise DistutilsFileError, \
"could not copy '%s' to '%s': %s" % (src, dst, exc[-1])
!
# If linking (hard or symbolic), use the appropriate system call
# (Unix only, of course, but that's the caller's responsibility)
***************
*** 190,194 ****
from os.path import exists, isfile, isdir, basename, dirname
import errno
!
if verbose:
print "moving %s -> %s" % (src, dst)
--- 190,194 ----
from os.path import exists, isfile, isdir, basename, dirname
import errno
!
if verbose:
print "moving %s -> %s" % (src, dst)
***************
*** 233,237 ****
pass
raise DistutilsFileError, \
! ("couldn't move '%s' to '%s' by copy/delete: " +
"delete '%s' failed: %s") % \
(src, dst, src, msg)
--- 233,237 ----
pass
raise DistutilsFileError, \
! ("couldn't move '%s' to '%s' by copy/delete: " +
"delete '%s' failed: %s") % \
(src, dst, src, msg)
Index: filelist.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/filelist.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** filelist.py 2000/09/26 02:02:51 1.8
--- filelist.py 2001/12/06 20:51:35 1.9
***************
*** 8,12 ****
# most parts taken from commands/sdist.py
# renamed 2000/07/29 (to filelist.py) and officially added to
! # the Distutils source, Greg Ward
__revision__ = "$Id$"
--- 8,12 ----
# most parts taken from commands/sdist.py
# renamed 2000/07/29 (to filelist.py) and officially added to
! # the Distutils source, Greg Ward
__revision__ = "$Id$"
***************
*** 35,40 ****
"""
! def __init__(self,
! warn=None,
debug_print=None):
# use standard warning and debug functions if no other given
--- 35,40 ----
"""
! def __init__(self,
! warn=None,
debug_print=None):
# use standard warning and debug functions if no other given
***************
*** 54,61 ****
# -- Fallback warning/debug functions ------------------------------
!
def __warn (self, msg):
sys.stderr.write("warning: %s\n" % msg)
!
def __debug_print (self, msg):
"""Print 'msg' to stdout if the global DEBUG (taken from the
--- 54,61 ----
# -- Fallback warning/debug functions ------------------------------
!
def __warn (self, msg):
sys.stderr.write("warning: %s\n" % msg)
!
def __debug_print (self, msg):
"""Print 'msg' to stdout if the global DEBUG (taken from the
***************
*** 94,98 ****
# -- "File template" methods ---------------------------------------
!
def _parse_template_line (self, line):
words = string.split(line)
--- 94,98 ----
# -- "File template" methods ---------------------------------------
!
def _parse_template_line (self, line):
words = string.split(line)
***************
*** 130,137 ****
# _parse_template_line ()
-
- def process_template_line (self, line):
# Parse the line: split it up, make sure the right number of words
# is there, and return the relevant words. 'action' is always
--- 130,137 ----
# _parse_template_line ()
+ def process_template_line (self, line):
+
# Parse the line: split it up, make sure the right number of words
# is there, and return the relevant words. 'action' is always
***************
*** 191,195 ****
"found under directory '%s'") %
(pattern, dir))
!
elif action == 'graft':
self.debug_print("graft " + dir_pattern)
--- 191,195 ----
"found under directory '%s'") %
(pattern, dir))
!
elif action == 'graft':
self.debug_print("graft " + dir_pattern)
***************
*** 252,256 ****
self.files.append(name)
files_found = 1
!
return files_found
--- 252,256 ----
self.files.append(name)
files_found = 1
!
return files_found
***************
*** 262,266 ****
"""Remove strings (presumably filenames) from 'files' that match
'pattern'. Other parameters are the same as for
! 'include_pattern()', above.
The list 'self.files' is modified in place.
Return 1 if files are found.
--- 262,266 ----
"""Remove strings (presumably filenames) from 'files' that match
'pattern'. Other parameters are the same as for
! 'include_pattern()', above.
The list 'self.files' is modified in place.
Return 1 if files are found.
***************
*** 275,279 ****
del self.files[i]
files_found = 1
!
return files_found
--- 275,279 ----
del self.files[i]
files_found = 1
!
return files_found
***************
*** 355,359 ****
else:
pattern_re = ''
!
if prefix is not None:
prefix_re = (glob_to_re(prefix))[0:-1] # ditch trailing $
--- 355,359 ----
else:
pattern_re = ''
!
if prefix is not None:
prefix_re = (glob_to_re(prefix))[0:-1] # ditch trailing $
***************
*** 362,366 ****
if anchor:
pattern_re = "^" + pattern_re
!
return re.compile(pattern_re)
--- 362,366 ----
if anchor:
pattern_re = "^" + pattern_re
!
return re.compile(pattern_re)
Index: msvccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/msvccompiler.py,v
retrieving revision 1.42
retrieving revision 1.43
diff -C2 -d -r1.42 -r1.43
*** msvccompiler.py 2000/09/27 02:08:14 1.42
--- msvccompiler.py 2001/12/06 20:51:35 1.43
***************
*** 51,57 ****
HKEY_CURRENT_USER = hkey_mod.HKEY_CURRENT_USER
HKEY_USERS = hkey_mod.HKEY_USERS
-
-
def get_devstudio_versions ():
"""Get list of devstudio versions from the Windows registry. Return a
--- 51,57 ----
HKEY_CURRENT_USER = hkey_mod.HKEY_CURRENT_USER
HKEY_USERS = hkey_mod.HKEY_USERS
+
+
def get_devstudio_versions ():
"""Get list of devstudio versions from the Windows registry. Return a
***************
*** 94,98 ****
a list of strings; will be empty list if unable to access the
registry or appropriate registry keys not found."""
!
if not _can_read_reg:
return []
--- 94,98 ----
a list of strings; will be empty list if unable to access the
registry or appropriate registry keys not found."""
!
if not _can_read_reg:
return []
***************
*** 150,154 ****
return fn
! return exe # last desperate hope
--- 150,154 ----
return fn
! return exe # last desperate hope
***************
*** 295,299 ****
else:
compile_opts.extend (self.compile_options)
!
for i in range (len (sources)):
src = sources[i] ; obj = objects[i]
--- 295,299 ----
else:
compile_opts.extend (self.compile_options)
!
for i in range (len (sources)):
src = sources[i] ; obj = objects[i]
***************
*** 391,400 ****
except DistutilsExecError, msg:
raise LibError, msg
!
else:
self.announce ("skipping %s (up-to-date)" % output_filename)
# create_static_lib ()
!
def link (self,
target_desc,
--- 391,400 ----
except DistutilsExecError, msg:
raise LibError, msg
!
else:
self.announce ("skipping %s (up-to-date)" % output_filename)
# create_static_lib ()
!
def link (self,
target_desc,
***************
*** 418,422 ****
self.warn ("I don't know what to do with 'runtime_library_dirs': "
+ str (runtime_library_dirs))
!
lib_opts = gen_lib_options (self,
library_dirs, runtime_library_dirs,
--- 418,422 ----
self.warn ("I don't know what to do with 'runtime_library_dirs': "
+ str (runtime_library_dirs))
!
lib_opts = gen_lib_options (self,
library_dirs, runtime_library_dirs,
***************
*** 442,446 ****
export_opts.append("/EXPORT:" + sym)
! ld_args = (ldflags + lib_opts + export_opts +
objects + ['/OUT:' + output_filename])
--- 442,446 ----
export_opts.append("/EXPORT:" + sym)
! ld_args = (ldflags + lib_opts + export_opts +
objects + ['/OUT:' + output_filename])
Index: mwerkscompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/mwerkscompiler.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** mwerkscompiler.py 2001/11/10 23:20:22 1.5
--- mwerkscompiler.py 2001/12/06 20:51:35 1.6
***************
*** 53,58 ****
CCompiler.__init__ (self, verbose, dry_run, force)
!
!
def compile (self,
sources,
--- 53,58 ----
CCompiler.__init__ (self, verbose, dry_run, force)
!
!
def compile (self,
sources,
***************
*** 63,74 ****
extra_preargs=None,
extra_postargs=None):
! (output_dir, macros, include_dirs) = \
! self._fix_compile_args (output_dir, macros, include_dirs)
! self.__sources = sources
! self.__macros = macros
! self.__include_dirs = include_dirs
! # Don't need extra_preargs and extra_postargs for CW
! return []
!
def link (self,
target_desc,
--- 63,74 ----
extra_preargs=None,
extra_postargs=None):
! (output_dir, macros, include_dirs) = \
! self._fix_compile_args (output_dir, macros, include_dirs)
! self.__sources = sources
! self.__macros = macros
! self.__include_dirs = include_dirs
! # Don't need extra_preargs and extra_postargs for CW
! return []
!
def link (self,
target_desc,
***************
*** 199,203 ****
print '\tBuild project'
mkcwproject.buildproject(projectfilename)
!
def _filename_to_abs(self, filename):
# Some filenames seem to be unix-like. Convert to Mac names.
--- 199,203 ----
print '\tBuild project'
mkcwproject.buildproject(projectfilename)
!
def _filename_to_abs(self, filename):
# Some filenames seem to be unix-like. Convert to Mac names.
***************
*** 208,219 ****
filename = distutils.util.convert_path(filename)
if not os.path.isabs(filename):
! curdir = os.getcwd()
! filename = os.path.join(curdir, filename)
# Finally remove .. components
components = string.split(filename, ':')
for i in range(1, len(components)):
! if components[i] == '..':
! components[i] = ''
return string.join(components, ':')
-
-
--- 208,217 ----
filename = distutils.util.convert_path(filename)
if not os.path.isabs(filename):
! curdir = os.getcwd()
! filename = os.path.join(curdir, filename)
# Finally remove .. components
components = string.split(filename, ':')
for i in range(1, len(components)):
! if components[i] == '..':
! components[i] = ''
return string.join(components, ':')
Index: spawn.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/spawn.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** spawn.py 2000/09/26 02:00:51 1.10
--- spawn.py 2001/12/06 20:51:35 1.11
***************
*** 72,76 ****
if search_path:
# either we find one or it stays the same
! executable = find_executable(executable) or executable
if verbose:
print string.join([executable] + cmd[1:], ' ')
--- 72,76 ----
if search_path:
# either we find one or it stays the same
! executable = find_executable(executable) or executable
if verbose:
print string.join([executable] + cmd[1:], ' ')
***************
*** 88,92 ****
"command '%s' failed with exit status %d" % (cmd[0], rc)
!
def _spawn_posix (cmd,
search_path=1,
--- 88,92 ----
"command '%s' failed with exit status %d" % (cmd[0], rc)
!
def _spawn_posix (cmd,
search_path=1,
***************
*** 111,119 ****
(cmd[0], e.strerror))
os._exit(1)
!
sys.stderr.write("unable to execute %s for unknown reasons" % cmd[0])
os._exit(1)
!
else: # in the parent
# Loop until the child either exits or is terminated by a signal
--- 111,119 ----
(cmd[0], e.strerror))
os._exit(1)
!
sys.stderr.write("unable to execute %s for unknown reasons" % cmd[0])
os._exit(1)
!
else: # in the parent
# Loop until the child either exits or is terminated by a signal
***************
*** 134,138 ****
"command '%s' failed with exit status %d" % \
(cmd[0], exit_status)
!
elif os.WIFSTOPPED(status):
continue
--- 134,138 ----
"command '%s' failed with exit status %d" % \
(cmd[0], exit_status)
!
elif os.WIFSTOPPED(status):
continue
***************
*** 167,169 ****
return executable
! # find_executable()
--- 167,169 ----
return executable
! # find_executable()
Index: sysconfig.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/sysconfig.py,v
retrieving revision 1.43
retrieving revision 1.44
diff -C2 -d -r1.43 -r1.44
*** sysconfig.py 2001/09/05 12:02:59 1.43
--- sysconfig.py 2001/12/06 20:51:35 1.44
***************
*** 49,53 ****
If 'prefix' is supplied, use it instead of sys.prefix or
sys.exec_prefix -- i.e., ignore 'plat_specific'.
! """
if prefix is None:
prefix = plat_specific and EXEC_PREFIX or PREFIX
--- 49,53 ----
If 'prefix' is supplied, use it instead of sys.prefix or
sys.exec_prefix -- i.e., ignore 'plat_specific'.
! """
if prefix is None:
prefix = plat_specific and EXEC_PREFIX or PREFIX
***************
*** 319,323 ****
if python_build:
g['LDSHARED'] = g['BLDSHARED']
!
elif sys.version < '2.1':
# The following two branches are for 1.5.2 compatibility.
--- 319,323 ----
if python_build:
g['LDSHARED'] = g['BLDSHARED']
!
elif sys.version < '2.1':
# The following two branches are for 1.5.2 compatibility.
***************
*** 338,342 ****
linkerscript_name = os.path.basename(string.split(g['LDSHARED'])[0])
linkerscript = os.path.join(python_lib, 'config', linkerscript_name)
!
# XXX this isn't the right place to do this: adding the Python
# library to the link, if needed, should be in the "build_ext"
--- 338,342 ----
linkerscript_name = os.path.basename(string.split(g['LDSHARED'])[0])
linkerscript = os.path.join(python_lib, 'config', linkerscript_name)
!
# XXX this isn't the right place to do this: adding the Python
# library to the link, if needed, should be in the "build_ext"
***************
*** 346,350 ****
g['LDSHARED'] = ("%s -L%s/lib -lpython%s" %
(linkerscript, PREFIX, sys.version[0:3]))
!
global _config_vars
_config_vars = g
--- 346,350 ----
g['LDSHARED'] = ("%s -L%s/lib -lpython%s" %
(linkerscript, PREFIX, sys.version[0:3]))
!
global _config_vars
_config_vars = g
Index: text_file.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/text_file.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** text_file.py 2000/09/16 18:33:36 1.13
--- text_file.py 2001/12/06 20:51:35 1.14
***************
*** 87,91 ****
if filename is None and file is None:
raise RuntimeError, \
! "you must supply either or both of 'filename' and 'file'"
# set values for all options -- either from client option hash
--- 87,91 ----
if filename is None and file is None:
raise RuntimeError, \
! "you must supply either or both of 'filename' and 'file'"
# set values for all options -- either from client option hash
***************
*** 114,118 ****
# 'unreadline()' operation
self.linebuf = []
!
def open (self, filename):
--- 114,118 ----
# 'unreadline()' operation
self.linebuf = []
!
def open (self, filename):
***************
*** 214,218 ****
eol = (line[-1] == '\n') and '\n' or ''
line = line[0:pos] + eol
!
# If all that's left is whitespace, then skip line
# *now*, before we try to join it to 'buildup_line' --
--- 214,218 ----
eol = (line[-1] == '\n') and '\n' or ''
line = line[0:pos] + eol
!
# If all that's left is whitespace, then skip line
# *now*, before we try to join it to 'buildup_line' --
***************
*** 227,232 ****
else: # it's an escaped "#"
line = string.replace (line, "\\#", "#")
-
# did previous line end with a backslash? then accumulate
if self.join_lines and buildup_line:
--- 227,232 ----
else: # it's an escaped "#"
line = string.replace (line, "\\#", "#")
+
# did previous line end with a backslash? then accumulate
if self.join_lines and buildup_line:
***************
*** 257,261 ****
else:
self.current_line = self.current_line + 1
!
# strip whitespace however the client wants (leading and
--- 257,261 ----
else:
self.current_line = self.current_line + 1
!
# strip whitespace however the client wants (leading and
***************
*** 352,356 ****
print "** received:"
print result
!
filename = "test.txt"
--- 352,356 ----
print "** received:"
print result
!
filename = "test.txt"
***************
*** 383,385 ****
os.remove (filename)
-
--- 383,384 ----
Index: unixccompiler.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/unixccompiler.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** unixccompiler.py 2001/08/27 15:08:16 1.36
--- unixccompiler.py 2001/12/06 20:51:35 1.37
***************
*** 104,109 ****
# We need to preprocess: either we're being forced to, or we're
! # generating output to stdout, or there's a target output file and
! # the source file is newer than the target (or the target doesn't
# exist).
if self.force or output_file is None or newer(source, output_file):
--- 104,109 ----
# We need to preprocess: either we're being forced to, or we're
! # generating output to stdout, or there's a target output file and
! # the source file is newer than the target (or the target doesn't
# exist).
if self.force or output_file is None or newer(source, output_file):
***************
*** 140,144 ****
# Compile all source files that weren't eliminated by
! # '_prep_compile()'.
for i in range(len(sources)):
src = sources[i] ; obj = objects[i]
--- 140,144 ----
# Compile all source files that weren't eliminated by
! # '_prep_compile()'.
for i in range(len(sources)):
src = sources[i] ; obj = objects[i]
***************
*** 158,162 ****
# compile ()
!
def create_static_lib (self,
--- 158,162 ----
# compile ()
!
def create_static_lib (self,
***************
*** 194,198 ****
def link (self,
! target_desc,
objects,
output_filename,
--- 194,198 ----
def link (self,
! target_desc,
objects,
output_filename,
***************
*** 220,224 ****
if self._need_link(objects, output_filename):
! ld_args = (objects + self.objects +
lib_opts + ['-o', output_filename])
if debug:
--- 220,224 ----
if self._need_link(objects, output_filename):
! ld_args = (objects + self.objects +
lib_opts + ['-o', output_filename])
if debug:
***************
*** 230,234 ****
self.mkpath(os.path.dirname(output_filename))
try:
! if target_desc == CCompiler.EXECUTABLE:
self.spawn(self.linker_exe + ld_args)
else:
--- 230,234 ----
self.mkpath(os.path.dirname(output_filename))
try:
! if target_desc == CCompiler.EXECUTABLE:
self.spawn(self.linker_exe + ld_args)
else:
***************
*** 245,249 ****
# These are all used by the 'gen_lib_options() function, in
# ccompiler.py.
!
def library_dir_option (self, dir):
return "-L" + dir
--- 245,249 ----
# These are all used by the 'gen_lib_options() function, in
# ccompiler.py.
!
def library_dir_option (self, dir):
return "-L" + dir
Index: util.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/util.py,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** util.py 2001/07/20 19:29:04 1.64
--- util.py 2001/12/06 20:51:35 1.65
***************
*** 31,35 ****
irix-5.3
irix64-6.2
!
For non-POSIX platforms, currently just returns 'sys.platform'.
"""
--- 31,35 ----
irix-5.3
irix64-6.2
!
For non-POSIX platforms, currently just returns 'sys.platform'.
"""
***************
*** 45,51 ****
# Convert the OS name to lowercase and remove '/' characters
# (to accommodate BSD/OS)
! osname = string.lower(osname)
osname = string.replace(osname, '/', '')
!
if osname[:5] == "linux":
# At least on Linux/Intel, 'machine' is the processor --
--- 45,51 ----
# Convert the OS name to lowercase and remove '/' characters
# (to accommodate BSD/OS)
! osname = string.lower(osname)
osname = string.replace(osname, '/', '')
!
if osname[:5] == "linux":
# At least on Linux/Intel, 'machine' is the processor --
***************
*** 60,64 ****
elif osname[:4] == "irix": # could be "irix64"!
return "%s-%s" % (osname, release)
! elif osname[:3] == "aix":
return "%s-%s.%s" % (osname, version, release)
elif osname[:6] == "cygwin":
--- 60,64 ----
elif osname[:4] == "irix": # could be "irix64"!
return "%s-%s" % (osname, release)
! elif osname[:3] == "aix":
return "%s-%s.%s" % (osname, version, release)
elif osname[:6] == "cygwin":
***************
*** 68,72 ****
if m:
release = m.group()
!
return "%s-%s-%s" % (osname, release, machine)
--- 68,72 ----
if m:
release = m.group()
!
return "%s-%s-%s" % (osname, release, machine)
***************
*** 281,285 ****
if msg is None:
msg = "%s%s" % (func.__name__, `args`)
! if msg[-2:] == ',)': # correct for singleton tuple
msg = msg[0:-2] + ')'
--- 281,285 ----
if msg is None:
msg = "%s%s" % (func.__name__, `args`)
! if msg[-2:] == ',)': # correct for singleton tuple
msg = msg[0:-2] + ')'
***************
*** 404,408 ****
execute(os.remove, (script_name,), "removing %s" % script_name,
verbose=verbose, dry_run=dry_run)
!
# "Direct" byte-compilation: use the py_compile module to compile
# right here, right now. Note that the script generated in indirect
--- 404,408 ----
execute(os.remove, (script_name,), "removing %s" % script_name,
verbose=verbose, dry_run=dry_run)
!
# "Direct" byte-compilation: use the py_compile module to compile
# right here, right now. Note that the script generated in indirect
***************
*** 454,457 ****
header = string.join(lines, '\n' + 8*' ')
return header
-
-
--- 454,455 ----
Index: version.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/version.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** version.py 2001/03/22 03:48:31 1.5
--- version.py 2001/12/06 20:51:35 1.6
***************
*** 99,103 ****
in the distutils documentation.
"""
!
version_re = re.compile(r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$',
re.VERBOSE)
--- 99,103 ----
in the distutils documentation.
"""
!
version_re = re.compile(r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$',
re.VERBOSE)
***************
*** 124,128 ****
def __str__ (self):
!
if self.version[2] == 0:
vstring = string.join(map(str, self.version[0:2]), '.')
--- 124,128 ----
def __str__ (self):
!
if self.version[2] == 0:
vstring = string.join(map(str, self.version[0:2]), '.')
***************
*** 134,138 ****
return vstring
!
def __cmp__ (self, other):
--- 134,138 ----
return vstring
!
def __cmp__ (self, other):
***************
*** 171,175 ****
# compared lexicographically
# 3) recognize the numeric components may have leading zeroes
! #
# The LooseVersion class below implements these rules: a version number
# string is split up into a tuple of integer and string components, and
--- 171,175 ----
# compared lexicographically
# 3) recognize the numeric components may have leading zeroes
! #
# The LooseVersion class below implements these rules: a version number
# string is split up into a tuple of integer and string components, and
***************
*** 186,190 ****
# but of course this can't cover all version number schemes, and there's
# no way to know what a programmer means without asking him.
! #
# The problem is what to do with letters (and other non-numeric
# characters) in a version number. The current implementation does the
--- 186,190 ----
# but of course this can't cover all version number schemes, and there's
# no way to know what a programmer means without asking him.
! #
# The problem is what to do with letters (and other non-numeric
# characters) in a version number. The current implementation does the
***************
*** 209,213 ****
# anarchists in the lot will never give in, though, and something needs
# to be done to accommodate them.
! #
# Perhaps a "moderately strict" version class could be implemented that
# lets almost anything slide (syntactically), and makes some heuristic
--- 209,213 ----
# anarchists in the lot will never give in, though, and something needs
# to be done to accommodate them.
! #
# Perhaps a "moderately strict" version class could be implemented that
# lets almost anything slide (syntactically), and makes some heuristic
***************
*** 218,222 ****
# just as happy dealing with things like "2g6" and "1.13++". I don't
# think I'm smart enough to do it right though.
! #
# In any case, I've coded the test suite for this module (see
# ../test/test_version.py) specifically to fail on things like comparing
--- 218,222 ----
# just as happy dealing with things like "2g6" and "1.13++". I don't
# think I'm smart enough to do it right though.
! #
# In any case, I've coded the test suite for this module (see
# ../test/test_version.py) specifically to fail on things like comparing
***************
*** 297,301 ****
return cmp(self.version, other.version)
!
# end class LooseVersion
--- 297,301 ----
return cmp(self.version, other.version)
!
# end class LooseVersion
- Previous message: [Python-checkins] CVS: python/dist/src/Lib/distutils dist.py,1.51,1.52
- Next message: [Python-checkins] CVS: python/dist/src/Lib/distutils/command config.py,1.9,1.10 bdist.py,1.20,1.21 bdist_rpm.py,1.26,1.27 bdist_wininst.py,1.24,1.25 sdist.py,1.52,1.53 install_headers.py,1.7,1.8 install_lib.py,1.37,1.38 install.py,1.59,1.60
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]