summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-12-06 21:01:19 (GMT)
committerFred Drake <fdrake@acm.org>2001-12-06 21:01:19 (GMT)
commit21d45356b8a22bb3091a97f50b919b57798675f5 (patch)
treebdfd02aba3e9f0a243296721cb8ec2c75be9c08a /Lib/distutils/command
parentb94b849d65af71b4b432a74fdaef8ccd88209cc0 (diff)
downloadcpython-21d45356b8a22bb3091a97f50b919b57798675f5.zip
cpython-21d45356b8a22bb3091a97f50b919b57798675f5.tar.gz
cpython-21d45356b8a22bb3091a97f50b919b57798675f5.tar.bz2
Whitespace normalization.
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r--Lib/distutils/command/bdist.py4
-rw-r--r--Lib/distutils/command/bdist_rpm.py22
-rw-r--r--Lib/distutils/command/bdist_wininst.py2
-rw-r--r--Lib/distutils/command/build_clib.py4
-rw-r--r--Lib/distutils/command/build_ext.py20
-rw-r--r--Lib/distutils/command/build_py.py6
-rw-r--r--Lib/distutils/command/config.py4
-rw-r--r--Lib/distutils/command/install.py10
-rw-r--r--Lib/distutils/command/install_headers.py2
-rw-r--r--Lib/distutils/command/install_lib.py12
-rw-r--r--Lib/distutils/command/sdist.py10
11 files changed, 48 insertions, 48 deletions
diff --git a/Lib/distutils/command/bdist.py b/Lib/distutils/command/bdist.py
index a75303e..2b1951f 100644
--- a/Lib/distutils/command/bdist.py
+++ b/Lib/distutils/command/bdist.py
@@ -17,7 +17,7 @@ from distutils.util import get_platform
def show_formats ():
"""Print list of available formats (arguments to "--format" option).
"""
- from distutils.fancy_getopt import FancyGetopt
+ from distutils.fancy_getopt import FancyGetopt
formats=[]
for format in bdist.format_commands:
formats.append(("formats=" + format, None,
@@ -104,7 +104,7 @@ class bdist (Command):
if self.dist_dir is None:
self.dist_dir = "dist"
-
+
# finalize_options()
diff --git a/Lib/distutils/command/bdist_rpm.py b/Lib/distutils/command/bdist_rpm.py
index 150fdec..037ed9e 100644
--- a/Lib/distutils/command/bdist_rpm.py
+++ b/Lib/distutils/command/bdist_rpm.py
@@ -101,7 +101,7 @@ class bdist_rpm (Command):
'no-rpm-opt-flags': 'use-rpm-opt-flags',
'rpm2-mode': 'rpm3-mode'}
-
+
def initialize_options (self):
self.bdist_base = None
self.rpm_base = None
@@ -184,7 +184,7 @@ class bdist_rpm (Command):
self.ensure_string('vendor',
"%s <%s>" % (self.distribution.get_contact(),
self.distribution.get_contact_email()))
- self.ensure_string('packager')
+ self.ensure_string('packager')
self.ensure_string_list('doc_files')
if type(self.doc_files) is ListType:
for readme in ('README', 'README.txt'):
@@ -201,7 +201,7 @@ class bdist_rpm (Command):
self.changelog = self._format_changelog(self.changelog)
self.ensure_filename('icon')
-
+
self.ensure_filename('prep_script')
self.ensure_filename('build_script')
self.ensure_filename('install_script')
@@ -275,7 +275,7 @@ class bdist_rpm (Command):
else:
raise DistutilsFileError, \
"icon file '%s' does not exist" % self.icon
-
+
# build package
self.announce('building RPMs')
@@ -368,17 +368,17 @@ class bdist_rpm (Command):
spec_file.append('%s: %s' % (field, string.join(val)))
elif val is not None:
spec_file.append('%s: %s' % (field, val))
-
-
+
+
if self.distribution.get_url() != 'UNKNOWN':
spec_file.append('Url: ' + self.distribution.get_url())
if self.distribution_name:
- spec_file.append('Distribution: ' + self.distribution_name)
+ spec_file.append('Distribution: ' + self.distribution_name)
if self.build_requires:
- spec_file.append('BuildRequires: ' +
- string.join(self.build_requires))
+ spec_file.append('BuildRequires: ' +
+ string.join(self.build_requires))
if self.icon:
spec_file.append('Icon: ' + os.path.basename(self.icon))
@@ -473,11 +473,11 @@ class bdist_rpm (Command):
new_changelog.append(line)
else:
new_changelog.append(' ' + line)
-
+
# strip trailing newline inserted by first changelog entry
if not new_changelog[0]:
del new_changelog[0]
-
+
return new_changelog
# _format_changelog()
diff --git a/Lib/distutils/command/bdist_wininst.py b/Lib/distutils/command/bdist_wininst.py
index 7cdf385..357ba51 100644
--- a/Lib/distutils/command/bdist_wininst.py
+++ b/Lib/distutils/command/bdist_wininst.py
@@ -196,7 +196,7 @@ class bdist_wininst (Command):
file.write(self.get_exe_bytes())
if bitmap:
file.write(bitmapdata)
-
+
file.write(cfgdata)
header = struct.pack("<iii",
0x1234567A, # tag
diff --git a/Lib/distutils/command/build_clib.py b/Lib/distutils/command/build_clib.py
index 69ed044..b659147 100644
--- a/Lib/distutils/command/build_clib.py
+++ b/Lib/distutils/command/build_clib.py
@@ -156,7 +156,7 @@ class build_clib (Command):
"must be a string (the library name)"
if '/' in lib[0] or (os.sep != '/' and os.sep in lib[0]):
raise DistutilsSetupError, \
- ("bad library name '%s': " +
+ ("bad library name '%s': " +
"may not contain directory separators") % \
lib[0]
@@ -195,7 +195,7 @@ class build_clib (Command):
("in 'libraries' option (library '%s'), "
"'sources' must be present and must be "
"a list of source filenames") % lib_name
-
+
filenames.extend(sources)
return filenames
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index 259a844..c9e3062 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -28,7 +28,7 @@ def show_compilers ():
class build_ext (Command):
-
+
description = "build C/C++ extensions (compile/link to build directory)"
# XXX thoughts on how to deal with complex command-line options like
@@ -123,7 +123,7 @@ class build_ext (Command):
self.package = self.distribution.ext_package
self.extensions = self.distribution.ext_modules
-
+
# Make sure Python's include directories (for Python.h, pyconfig.h,
# etc.) are in the include search path.
@@ -181,7 +181,7 @@ class build_ext (Command):
# it has to be a list of 2-tuples. All the preprocessor symbols
# specified by the 'define' option will be set to '1'. Multiple
# symbols can be separated with commas.
-
+
if self.define:
defines = string.split(self.define, ',')
self.define = map(lambda symbol: (symbol, '1'), defines)
@@ -193,7 +193,7 @@ class build_ext (Command):
self.undef = string.split(self.undef, ',')
# finalize_options ()
-
+
def run (self):
@@ -202,7 +202,7 @@ class build_ext (Command):
# 'self.extensions', as supplied by setup.py, is a list of
# Extension instances. See the documentation for Extension (in
# distutils.extension) for details.
- #
+ #
# For backwards compatibility with Distutils 0.8.2 and earlier, we
# also allow the 'extensions' list to be a list of tuples:
# (ext_name, build_info)
@@ -271,7 +271,7 @@ class build_ext (Command):
if type(extensions) is not ListType:
raise DistutilsSetupError, \
"'ext_modules' option must be a list of Extension instances"
-
+
for i in range(len(extensions)):
ext = extensions[i]
if isinstance(ext, Extension):
@@ -280,7 +280,7 @@ class build_ext (Command):
(ext_name, build_info) = ext
self.warn(("old-style (ext_name, build_info) tuple found in "
- "ext_modules for extension '%s'"
+ "ext_modules for extension '%s'"
"-- please convert to Extension instance" % ext_name))
if type(ext) is not TupleType and len(ext) != 2:
raise DistutilsSetupError, \
@@ -465,12 +465,12 @@ class build_ext (Command):
self.compiler.link_shared_object(
- objects, ext_filename,
+ objects, ext_filename,
libraries=self.get_libraries(ext),
library_dirs=ext.library_dirs,
runtime_library_dirs=ext.runtime_library_dirs,
extra_postargs=extra_args,
- export_symbols=self.get_export_symbols(ext),
+ export_symbols=self.get_export_symbols(ext),
debug=self.debug,
build_temp=self.build_temp)
@@ -549,7 +549,7 @@ class build_ext (Command):
"on platform '%s'") % os.name
# find_swig ()
-
+
# -- Name generators -----------------------------------------------
# (extension names, filenames, whatever)
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py
index 6fd4417..527e81d 100644
--- a/Lib/distutils/command/build_py.py
+++ b/Lib/distutils/command/build_py.py
@@ -106,7 +106,7 @@ class build_py (Command):
self.byte_compile(self.get_outputs(include_bytecode=0))
# run ()
-
+
def get_package_dir (self, package):
"""Return the directory, relative to the top of the source
@@ -178,13 +178,13 @@ class build_py (Command):
# Either not in a package at all (__init__.py not expected), or
# __init__.py doesn't exist -- so don't return the filename.
return
-
+
# check_package ()
def check_module (self, module, module_file):
if not os.path.isfile(module_file):
- self.warn("file %s (for module %s) not found" %
+ self.warn("file %s (for module %s) not found" %
(module_file, module))
return 0
else:
diff --git a/Lib/distutils/command/config.py b/Lib/distutils/command/config.py
index b89997a..27c2cc1 100644
--- a/Lib/distutils/command/config.py
+++ b/Lib/distutils/command/config.py
@@ -147,7 +147,7 @@ class config (Command):
headers, include_dirs,
libraries, library_dirs, lang):
(src, obj) = self._compile(body, headers, include_dirs, lang)
- prog = os.path.splitext(os.path.basename(src))[0]
+ prog = os.path.splitext(os.path.basename(src))[0]
self.compiler.link_executable([obj], prog,
libraries=libraries,
library_dirs=library_dirs)
@@ -263,7 +263,7 @@ class config (Command):
self.announce(ok and "success!" or "failure.")
self._clean()
return ok
-
+
def try_run (self, body,
headers=None, include_dirs=None,
libraries=None, library_dirs=None,
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
index 022e34a..8755a14 100644
--- a/Lib/distutils/command/install.py
+++ b/Lib/distutils/command/install.py
@@ -110,7 +110,7 @@ class install (Command):
('optimize=', 'O',
"also compile with optimization: -O1 for \"python -O\", "
"-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),
-
+
# Miscellaneous control options
('force', 'f',
"force installation (overwrite any existing files)"),
@@ -305,7 +305,7 @@ class install (Command):
self.install_lib = self.install_platlib
else:
self.install_lib = self.install_purelib
-
+
# Convert directories from Unix /-separated syntax to the local
# convention.
@@ -353,7 +353,7 @@ class install (Command):
def finalize_unix (self):
-
+
if self.install_base is not None or self.install_platbase is not None:
if ((self.install_lib is None and
self.install_purelib is None and
@@ -426,7 +426,7 @@ class install (Command):
def expand_basedirs (self):
self._expand_attrs(['install_base',
'install_platbase',
- 'root'])
+ 'root'])
def expand_dirs (self):
self._expand_attrs(['install_purelib',
@@ -550,7 +550,7 @@ class install (Command):
if self.path_file and self.install_path_file:
outputs.append(os.path.join(self.install_libbase,
self.path_file + ".pth"))
-
+
return outputs
def get_inputs (self):
diff --git a/Lib/distutils/command/install_headers.py b/Lib/distutils/command/install_headers.py
index 2d72a07..495d150 100644
--- a/Lib/distutils/command/install_headers.py
+++ b/Lib/distutils/command/install_headers.py
@@ -32,7 +32,7 @@ class install_headers (Command):
self.set_undefined_options('install',
('install_headers', 'install_dir'),
('force', 'force'))
-
+
def run (self):
headers = self.distribution.headers
diff --git a/Lib/distutils/command/install_lib.py b/Lib/distutils/command/install_lib.py
index 6c4c7fe..029528e 100644
--- a/Lib/distutils/command/install_lib.py
+++ b/Lib/distutils/command/install_lib.py
@@ -20,7 +20,7 @@ class install_lib (Command):
# 4) compile "level 1" .pyo only (--no-compile --optimize)
# 5) compile .pyc and "level 2" .pyo (--compile --optimize-more)
# 6) compile "level 2" .pyo only (--no-compile --optimize-more)
- #
+ #
# The UI for this is two option, 'compile' and 'optimize'.
# 'compile' is strictly boolean, and only decides whether to
# generate .pyc files. 'optimize' is three-way (0, 1, or 2), and
@@ -38,7 +38,7 @@ class install_lib (Command):
"-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),
('skip-build', None, "skip the build steps"),
]
-
+
boolean_options = ['force', 'compile', 'skip-build']
negative_opt = {'no-compile' : 'compile'}
@@ -82,7 +82,7 @@ class install_lib (Command):
# Make sure we have built everything we need first
self.build()
-
+
# Install everything: simply dump the entire contents of the build
# directory to the installation directory (that's the beauty of
# having a build directory!)
@@ -104,7 +104,7 @@ class install_lib (Command):
self.run_command('build_py')
if self.distribution.has_ext_modules():
self.run_command('build_ext')
-
+
def install (self):
if os.path.isdir(self.build_dir):
outfiles = self.copy_tree(self.build_dir, self.install_dir)
@@ -164,7 +164,7 @@ class install_lib (Command):
bytecode_files.append(py_file + "o")
return bytecode_files
-
+
# -- External interface --------------------------------------------
# (called by outsiders)
@@ -199,7 +199,7 @@ class install_lib (Command):
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())
diff --git a/Lib/distutils/command/sdist.py b/Lib/distutils/command/sdist.py
index 894d7d4..fbd3c6d 100644
--- a/Lib/distutils/command/sdist.py
+++ b/Lib/distutils/command/sdist.py
@@ -131,7 +131,7 @@ class sdist (Command):
# 'filelist' contains the list of files that will make up the
# manifest
self.filelist = FileList()
-
+
# Ensure that all required meta-data is given; warn if not (but
# don't die, it's not *that* serious!)
self.check_metadata()
@@ -318,7 +318,7 @@ class sdist (Command):
self.filelist.extend(build_clib.get_source_files())
# add_defaults ()
-
+
def read_template (self):
@@ -395,7 +395,7 @@ class sdist (Command):
self.filelist.append(line)
# read_manifest ()
-
+
def make_release_tree (self, base_dir, files):
"""Create the directory tree that will become the source
@@ -419,7 +419,7 @@ class sdist (Command):
# that's out-of-date in 'base_dir'. (Usually, all files will be
# out-of-date, because by default we blow away 'base_dir' when
# we're done making the distribution archives.)
-
+
if hasattr(os, 'link'): # can make hard links on this system
link = 'hard'
msg = "making hard links in %s..." % base_dir
@@ -439,7 +439,7 @@ class sdist (Command):
self.copy_file(file, dest, link=link)
self.distribution.metadata.write_pkg_info(base_dir)
-
+
# make_release_tree ()
def make_distribution (self):