[Python-checkins] CVS: distutils/distutils/command install_lib.py,1.28,1.29
Greg Ward
python-dev@python.org
Fri, 22 Sep 2000 18:10:13 -0700
Update of /cvsroot/python/distutils/distutils/command
In directory slayer.i.sourceforge.net:/tmp/cvs-serv18249/command
Modified Files:
install_lib.py
Log Message:
Whitespace tweaks.
Index: install_lib.py
===================================================================
RCS file: /cvsroot/python/distutils/distutils/command/install_lib.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -r1.28 -r1.29
*** install_lib.py 2000/09/13 01:02:25 1.28
--- install_lib.py 2000/09/23 01:10:10 1.29
***************
*** 35,48 ****
# from the umbrella 'install' command -- build (source) directory,
# install (target) directory, and whether to compile .py files.
! self.set_undefined_options ('install',
! ('build_lib', 'build_dir'),
! ('install_lib', 'install_dir'),
! ('force', 'force'),
! ('compile_py', 'compile'),
! ('optimize_py', 'optimize'),
! ('skip_build', 'skip_build'),
! )
-
def run (self):
--- 35,47 ----
# from the umbrella 'install' command -- build (source) directory,
# install (target) directory, and whether to compile .py files.
! self.set_undefined_options('install',
! ('build_lib', 'build_dir'),
! ('install_lib', 'install_dir'),
! ('force', 'force'),
! ('compile_py', 'compile'),
! ('optimize_py', 'optimize'),
! ('skip_build', 'skip_build'),
! )
def run (self):
***************
*** 50,56 ****
if not self.skip_build:
if self.distribution.has_pure_modules():
! self.run_command ('build_py')
if self.distribution.has_ext_modules():
! self.run_command ('build_ext')
# Install everything: simply dump the entire contents of the build
--- 49,55 ----
if not self.skip_build:
if self.distribution.has_pure_modules():
! self.run_command('build_py')
if self.distribution.has_ext_modules():
! self.run_command('build_ext')
# Install everything: simply dump the entire contents of the build
***************
*** 58,62 ****
# having a build directory!)
if os.path.isdir(self.build_dir):
! outfiles = self.copy_tree (self.build_dir, self.install_dir)
else:
self.warn("'%s' does not exist -- no Python modules to install" %
--- 57,61 ----
# having a build directory!)
if os.path.isdir(self.build_dir):
! outfiles = self.copy_tree(self.build_dir, self.install_dir)
else:
self.warn("'%s' does not exist -- no Python modules to install" %
***************
*** 77,84 ****
out_fn = f + (__debug__ and "c" or "o")
compile_msg = "byte-compiling %s to %s" % \
! (f, os.path.basename (out_fn))
skip_msg = "skipping byte-compilation of %s" % f
! self.make_file (f, out_fn, compile, (f,),
! compile_msg, skip_msg)
# run ()
--- 76,83 ----
out_fn = f + (__debug__ and "c" or "o")
compile_msg = "byte-compiling %s to %s" % \
! (f, os.path.basename(out_fn))
skip_msg = "skipping byte-compilation of %s" % f
! self.make_file(f, out_fn, compile, (f,),
! compile_msg, skip_msg)
# run ()
***************
*** 89,100 ****
return []
! build_cmd = self.get_finalized_command (build_cmd)
build_files = build_cmd.get_outputs()
! build_dir = getattr (build_cmd, cmd_option)
! prefix_len = len (build_dir) + len (os.sep)
outputs = []
for file in build_files:
! outputs.append (os.path.join (output_dir, file[prefix_len:]))
return outputs
--- 88,99 ----
return []
! build_cmd = self.get_finalized_command(build_cmd)
build_files = build_cmd.get_outputs()
! build_dir = getattr(build_cmd, cmd_option)
! prefix_len = len(build_dir) + len(os.sep)
outputs = []
for file in build_files:
! outputs.append(os.path.join(output_dir, file[prefix_len:]))
return outputs
***************
*** 113,122 ****
"""Return the list of files that would be installed if this command
were actually run. Not affected by the "dry-run" flag or whether
! modules have actually been built yet."""
!
pure_outputs = \
! self._mutate_outputs (self.distribution.has_pure_modules(),
! 'build_py', 'build_lib',
! self.install_dir)
if self.compile:
bytecode_outputs = self._bytecode_filenames(pure_outputs)
--- 112,121 ----
"""Return the list of files that would be installed if this command
were actually run. Not affected by the "dry-run" flag or whether
! modules have actually been built yet.
! """
pure_outputs = \
! self._mutate_outputs(self.distribution.has_pure_modules(),
! 'build_py', 'build_lib',
! self.install_dir)
if self.compile:
bytecode_outputs = self._bytecode_filenames(pure_outputs)
***************
*** 125,131 ****
ext_outputs = \
! self._mutate_outputs (self.distribution.has_ext_modules(),
! 'build_ext', 'build_lib',
! self.install_dir)
return pure_outputs + bytecode_outputs + ext_outputs
--- 124,130 ----
ext_outputs = \
! self._mutate_outputs(self.distribution.has_ext_modules(),
! 'build_ext', 'build_lib',
! self.install_dir)
return pure_outputs + bytecode_outputs + ext_outputs
***************
*** 137,155 ****
files that get installed as they are named in the build tree.
The files in this list correspond one-to-one to the output
! filenames returned by 'get_outputs()'."""
!
inputs = []
if self.distribution.has_pure_modules():
! build_py = self.get_finalized_command ('build_py')
! inputs.extend (build_py.get_outputs())
if self.distribution.has_ext_modules():
! build_ext = self.get_finalized_command ('build_ext')
! inputs.extend (build_ext.get_outputs())
return inputs
-
-
# class install_lib
--- 136,152 ----
files that get installed as they are named in the build tree.
The files in this list correspond one-to-one to the output
! filenames returned by 'get_outputs()'.
! """
inputs = []
if self.distribution.has_pure_modules():
! build_py = self.get_finalized_command('build_py')
! inputs.extend(build_py.get_outputs())
if self.distribution.has_ext_modules():
! build_ext = self.get_finalized_command('build_ext')
! inputs.extend(build_ext.get_outputs())
return inputs
# class install_lib