Skip to content

Commit 21d4535

Browse files
committed
Whitespace normalization.
1 parent b94b849 commit 21d4535

11 files changed

Lines changed: 48 additions & 48 deletions

File tree

Lib/distutils/command/bdist.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
def show_formats ():
1818
"""Print list of available formats (arguments to "--format" option).
1919
"""
20-
from distutils.fancy_getopt import FancyGetopt
20+
from distutils.fancy_getopt import FancyGetopt
2121
formats=[]
2222
for format in bdist.format_commands:
2323
formats.append(("formats=" + format, None,
@@ -104,7 +104,7 @@ def finalize_options (self):
104104

105105
if self.dist_dir is None:
106106
self.dist_dir = "dist"
107-
107+
108108
# finalize_options()
109109

110110

Lib/distutils/command/bdist_rpm.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class bdist_rpm (Command):
101101
'no-rpm-opt-flags': 'use-rpm-opt-flags',
102102
'rpm2-mode': 'rpm3-mode'}
103103

104-
104+
105105
def initialize_options (self):
106106
self.bdist_base = None
107107
self.rpm_base = None
@@ -184,7 +184,7 @@ def finalize_package_data (self):
184184
self.ensure_string('vendor',
185185
"%s <%s>" % (self.distribution.get_contact(),
186186
self.distribution.get_contact_email()))
187-
self.ensure_string('packager')
187+
self.ensure_string('packager')
188188
self.ensure_string_list('doc_files')
189189
if type(self.doc_files) is ListType:
190190
for readme in ('README', 'README.txt'):
@@ -201,7 +201,7 @@ def finalize_package_data (self):
201201
self.changelog = self._format_changelog(self.changelog)
202202

203203
self.ensure_filename('icon')
204-
204+
205205
self.ensure_filename('prep_script')
206206
self.ensure_filename('build_script')
207207
self.ensure_filename('install_script')
@@ -275,7 +275,7 @@ def run (self):
275275
else:
276276
raise DistutilsFileError, \
277277
"icon file '%s' does not exist" % self.icon
278-
278+
279279

280280
# build package
281281
self.announce('building RPMs')
@@ -368,17 +368,17 @@ def _make_spec_file(self):
368368
spec_file.append('%s: %s' % (field, string.join(val)))
369369
elif val is not None:
370370
spec_file.append('%s: %s' % (field, val))
371-
372-
371+
372+
373373
if self.distribution.get_url() != 'UNKNOWN':
374374
spec_file.append('Url: ' + self.distribution.get_url())
375375

376376
if self.distribution_name:
377-
spec_file.append('Distribution: ' + self.distribution_name)
377+
spec_file.append('Distribution: ' + self.distribution_name)
378378

379379
if self.build_requires:
380-
spec_file.append('BuildRequires: ' +
381-
string.join(self.build_requires))
380+
spec_file.append('BuildRequires: ' +
381+
string.join(self.build_requires))
382382

383383
if self.icon:
384384
spec_file.append('Icon: ' + os.path.basename(self.icon))
@@ -473,11 +473,11 @@ def _format_changelog(self, changelog):
473473
new_changelog.append(line)
474474
else:
475475
new_changelog.append(' ' + line)
476-
476+
477477
# strip trailing newline inserted by first changelog entry
478478
if not new_changelog[0]:
479479
del new_changelog[0]
480-
480+
481481
return new_changelog
482482

483483
# _format_changelog()

Lib/distutils/command/bdist_wininst.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ def create_exe (self, arcname, fullname, bitmap=None):
196196
file.write(self.get_exe_bytes())
197197
if bitmap:
198198
file.write(bitmapdata)
199-
199+
200200
file.write(cfgdata)
201201
header = struct.pack("<iii",
202202
0x1234567A, # tag

Lib/distutils/command/build_clib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def check_library_list (self, libraries):
156156
"must be a string (the library name)"
157157
if '/' in lib[0] or (os.sep != '/' and os.sep in lib[0]):
158158
raise DistutilsSetupError, \
159-
("bad library name '%s': " +
159+
("bad library name '%s': " +
160160
"may not contain directory separators") % \
161161
lib[0]
162162

@@ -195,7 +195,7 @@ def get_source_files (self):
195195
("in 'libraries' option (library '%s'), "
196196
"'sources' must be present and must be "
197197
"a list of source filenames") % lib_name
198-
198+
199199
filenames.extend(sources)
200200

201201
return filenames

Lib/distutils/command/build_ext.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def show_compilers ():
2828

2929

3030
class build_ext (Command):
31-
31+
3232
description = "build C/C++ extensions (compile/link to build directory)"
3333

3434
# XXX thoughts on how to deal with complex command-line options like
@@ -123,7 +123,7 @@ def finalize_options (self):
123123
self.package = self.distribution.ext_package
124124

125125
self.extensions = self.distribution.ext_modules
126-
126+
127127

128128
# Make sure Python's include directories (for Python.h, pyconfig.h,
129129
# etc.) are in the include search path.
@@ -181,7 +181,7 @@ def finalize_options (self):
181181
# it has to be a list of 2-tuples. All the preprocessor symbols
182182
# specified by the 'define' option will be set to '1'. Multiple
183183
# symbols can be separated with commas.
184-
184+
185185
if self.define:
186186
defines = string.split(self.define, ',')
187187
self.define = map(lambda symbol: (symbol, '1'), defines)
@@ -193,7 +193,7 @@ def finalize_options (self):
193193
self.undef = string.split(self.undef, ',')
194194

195195
# finalize_options ()
196-
196+
197197

198198
def run (self):
199199

@@ -202,7 +202,7 @@ def run (self):
202202
# 'self.extensions', as supplied by setup.py, is a list of
203203
# Extension instances. See the documentation for Extension (in
204204
# distutils.extension) for details.
205-
#
205+
#
206206
# For backwards compatibility with Distutils 0.8.2 and earlier, we
207207
# also allow the 'extensions' list to be a list of tuples:
208208
# (ext_name, build_info)
@@ -271,7 +271,7 @@ def check_extensions_list (self, extensions):
271271
if type(extensions) is not ListType:
272272
raise DistutilsSetupError, \
273273
"'ext_modules' option must be a list of Extension instances"
274-
274+
275275
for i in range(len(extensions)):
276276
ext = extensions[i]
277277
if isinstance(ext, Extension):
@@ -280,7 +280,7 @@ def check_extensions_list (self, extensions):
280280

281281
(ext_name, build_info) = ext
282282
self.warn(("old-style (ext_name, build_info) tuple found in "
283-
"ext_modules for extension '%s'"
283+
"ext_modules for extension '%s'"
284284
"-- please convert to Extension instance" % ext_name))
285285
if type(ext) is not TupleType and len(ext) != 2:
286286
raise DistutilsSetupError, \
@@ -465,12 +465,12 @@ def build_extension(self, ext):
465465

466466

467467
self.compiler.link_shared_object(
468-
objects, ext_filename,
468+
objects, ext_filename,
469469
libraries=self.get_libraries(ext),
470470
library_dirs=ext.library_dirs,
471471
runtime_library_dirs=ext.runtime_library_dirs,
472472
extra_postargs=extra_args,
473-
export_symbols=self.get_export_symbols(ext),
473+
export_symbols=self.get_export_symbols(ext),
474474
debug=self.debug,
475475
build_temp=self.build_temp)
476476

@@ -549,7 +549,7 @@ def find_swig (self):
549549
"on platform '%s'") % os.name
550550

551551
# find_swig ()
552-
552+
553553
# -- Name generators -----------------------------------------------
554554
# (extension names, filenames, whatever)
555555

Lib/distutils/command/build_py.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def run (self):
106106
self.byte_compile(self.get_outputs(include_bytecode=0))
107107

108108
# run ()
109-
109+
110110

111111
def get_package_dir (self, package):
112112
"""Return the directory, relative to the top of the source
@@ -178,13 +178,13 @@ def check_package (self, package, package_dir):
178178
# Either not in a package at all (__init__.py not expected), or
179179
# __init__.py doesn't exist -- so don't return the filename.
180180
return
181-
181+
182182
# check_package ()
183183

184184

185185
def check_module (self, module, module_file):
186186
if not os.path.isfile(module_file):
187-
self.warn("file %s (for module %s) not found" %
187+
self.warn("file %s (for module %s) not found" %
188188
(module_file, module))
189189
return 0
190190
else:

Lib/distutils/command/config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def _link (self, body,
147147
headers, include_dirs,
148148
libraries, library_dirs, lang):
149149
(src, obj) = self._compile(body, headers, include_dirs, lang)
150-
prog = os.path.splitext(os.path.basename(src))[0]
150+
prog = os.path.splitext(os.path.basename(src))[0]
151151
self.compiler.link_executable([obj], prog,
152152
libraries=libraries,
153153
library_dirs=library_dirs)
@@ -263,7 +263,7 @@ def try_link (self, body,
263263
self.announce(ok and "success!" or "failure.")
264264
self._clean()
265265
return ok
266-
266+
267267
def try_run (self, body,
268268
headers=None, include_dirs=None,
269269
libraries=None, library_dirs=None,

Lib/distutils/command/install.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class install (Command):
110110
('optimize=', 'O',
111111
"also compile with optimization: -O1 for \"python -O\", "
112112
"-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),
113-
113+
114114
# Miscellaneous control options
115115
('force', 'f',
116116
"force installation (overwrite any existing files)"),
@@ -305,7 +305,7 @@ def finalize_options (self):
305305
self.install_lib = self.install_platlib
306306
else:
307307
self.install_lib = self.install_purelib
308-
308+
309309

310310
# Convert directories from Unix /-separated syntax to the local
311311
# convention.
@@ -353,7 +353,7 @@ def dump_dirs (self, msg):
353353

354354

355355
def finalize_unix (self):
356-
356+
357357
if self.install_base is not None or self.install_platbase is not None:
358358
if ((self.install_lib is None and
359359
self.install_purelib is None and
@@ -426,7 +426,7 @@ def _expand_attrs (self, attrs):
426426
def expand_basedirs (self):
427427
self._expand_attrs(['install_base',
428428
'install_platbase',
429-
'root'])
429+
'root'])
430430

431431
def expand_dirs (self):
432432
self._expand_attrs(['install_purelib',
@@ -550,7 +550,7 @@ def get_outputs (self):
550550
if self.path_file and self.install_path_file:
551551
outputs.append(os.path.join(self.install_libbase,
552552
self.path_file + ".pth"))
553-
553+
554554
return outputs
555555

556556
def get_inputs (self):

Lib/distutils/command/install_headers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def finalize_options (self):
3232
self.set_undefined_options('install',
3333
('install_headers', 'install_dir'),
3434
('force', 'force'))
35-
35+
3636

3737
def run (self):
3838
headers = self.distribution.headers

Lib/distutils/command/install_lib.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class install_lib (Command):
2020
# 4) compile "level 1" .pyo only (--no-compile --optimize)
2121
# 5) compile .pyc and "level 2" .pyo (--compile --optimize-more)
2222
# 6) compile "level 2" .pyo only (--no-compile --optimize-more)
23-
#
23+
#
2424
# The UI for this is two option, 'compile' and 'optimize'.
2525
# 'compile' is strictly boolean, and only decides whether to
2626
# generate .pyc files. 'optimize' is three-way (0, 1, or 2), and
@@ -38,7 +38,7 @@ class install_lib (Command):
3838
"-O2 for \"python -OO\", and -O0 to disable [default: -O0]"),
3939
('skip-build', None, "skip the build steps"),
4040
]
41-
41+
4242
boolean_options = ['force', 'compile', 'skip-build']
4343
negative_opt = {'no-compile' : 'compile'}
4444

@@ -82,7 +82,7 @@ def run (self):
8282

8383
# Make sure we have built everything we need first
8484
self.build()
85-
85+
8686
# Install everything: simply dump the entire contents of the build
8787
# directory to the installation directory (that's the beauty of
8888
# having a build directory!)
@@ -104,7 +104,7 @@ def build (self):
104104
self.run_command('build_py')
105105
if self.distribution.has_ext_modules():
106106
self.run_command('build_ext')
107-
107+
108108
def install (self):
109109
if os.path.isdir(self.build_dir):
110110
outfiles = self.copy_tree(self.build_dir, self.install_dir)
@@ -164,7 +164,7 @@ def _bytecode_filenames (self, py_filenames):
164164
bytecode_files.append(py_file + "o")
165165

166166
return bytecode_files
167-
167+
168168

169169
# -- External interface --------------------------------------------
170170
# (called by outsiders)
@@ -199,7 +199,7 @@ def get_inputs (self):
199199
filenames returned by 'get_outputs()'.
200200
"""
201201
inputs = []
202-
202+
203203
if self.distribution.has_pure_modules():
204204
build_py = self.get_finalized_command('build_py')
205205
inputs.extend(build_py.get_outputs())

0 commit comments

Comments
 (0)