Content-Length: 956539 | pFad | http://github.com/python/cpython/commit/b94b849d65af71b4b432a74fdaef8ccd88209cc0

50 Whitespace normalization. · python/cpython@b94b849 · GitHub
Skip to content

Commit b94b849

Browse files
committed
Whitespace normalization.
1 parent bcd8975 commit b94b849

21 files changed

Lines changed: 210 additions & 216 deletions

Lib/distutils/archive_util.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def make_tarball (base_name, base_dir, compress="gzip",
3131
compress_ext = { 'gzip': ".gz",
3232
'bzip2': '.bz2',
3333
'compress': ".Z" }
34-
34+
3535
# flags for compression program, each element of list will be an argument
3636
compress_flags = {'gzip': ["-f9"],
3737
'compress': ["-f"],
@@ -85,7 +85,7 @@ def make_zipfile (base_name, base_dir, verbose=0, dry_run=0):
8585
import zipfile
8686
except ImportError:
8787
raise DistutilsExecError, \
88-
("unable to create zip file '%s': " +
88+
("unable to create zip file '%s': " +
8989
"could neither find a standalone zip utility nor " +
9090
"import the 'zipfile' module") % zip_filename
9191

@@ -152,7 +152,7 @@ def make_archive (base_name, format,
152152

153153
kwargs = { 'verbose': verbose,
154154
'dry_run': dry_run }
155-
155+
156156
try:
157157
format_info = ARCHIVE_FORMATS[format]
158158
except KeyError:

Lib/distutils/bcppcompiler.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def compile (self,
102102
compile_opts.extend (self.compile_options_debug)
103103
else:
104104
compile_opts.extend (self.compile_options)
105-
105+
106106
for i in range (len (sources)):
107107
src = sources[i] ; obj = objects[i]
108108
ext = (os.path.splitext (src))[1]
@@ -130,11 +130,11 @@ def compile (self,
130130
input_opt = ""
131131
elif ext in self._cpp_extensions:
132132
input_opt = "-P"
133-
else:
133+
else:
134134
# Unknown file type -- no extra options. The compiler
135135
# will probably fail, but let it just in case this is a
136136
# file the compiler recognizes even if we don't.
137-
input_opt = ""
137+
input_opt = ""
138138

139139
output_opt = "-o" + obj
140140

@@ -174,17 +174,17 @@ def create_static_lib (self,
174174
if extra_postargs:
175175
lib_args.extend (extra_postargs)
176176
try:
177-
self.spawn ([self.lib] + lib_args)
177+
self.spawn ([self.lib] + lib_args)
178178
except DistutilsExecError, msg:
179-
raise LibError, msg
179+
raise LibError, msg
180180
else:
181181
self.announce ("skipping %s (up-to-date)" % output_filename)
182182

183183
# create_static_lib ()
184-
185-
184+
185+
186186
def link (self,
187-
target_desc,
187+
target_desc,
188188
objects,
189189
output_filename,
190190
output_dir=None,
@@ -254,14 +254,14 @@ def link (self,
254254
resources.append(file)
255255
else:
256256
objects.append(file)
257-
258-
257+
258+
259259
for l in library_dirs:
260-
ld_args.append("/L%s" % os.path.normpath(l))
260+
ld_args.append("/L%s" % os.path.normpath(l))
261261
ld_args.append("/L.") # we sometimes use relative paths
262262

263-
# list of object files
264-
ld_args.extend(objects)
263+
# list of object files
264+
ld_args.extend(objects)
265265

266266
# XXX the command-line syntax for Borland C++ is a bit wonky;
267267
# certain filenames are jammed together in one big string, but
@@ -275,11 +275,11 @@ def link (self,
275275

276276
# name of dll/exe file
277277
ld_args.extend([',',output_filename])
278-
# no map file and start libraries
278+
# no map file and start libraries
279279
ld_args.append(',,')
280280

281281
for lib in libraries:
282-
# see if we find it and if there is a bcpp specific lib
282+
# see if we find it and if there is a bcpp specific lib
283283
# (xxx_bcpp.lib)
284284
libfile = self.find_library_file(library_dirs, lib, debug)
285285
if libfile is None:
@@ -300,7 +300,7 @@ def link (self,
300300
ld_args.append(',')
301301
ld_args.extend(resources)
302302

303-
303+
304304
if extra_preargs:
305305
ld_args[:0] = extra_preargs
306306
if extra_postargs:

Lib/distutils/ccompiler.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class CCompiler:
6161
# different versions of libfoo.a in different locations. I
6262
# think this is useless without the ability to null out the
6363
# library search path anyways.
64-
64+
6565

6666
# Subclasses that rely on the standard filename generation methods
6767
# implemented below should override these; see the comment near
@@ -159,7 +159,7 @@ def set_executable(self, key, value):
159159
setattr(self, key, split_quoted(value))
160160
else:
161161
setattr(self, key, value)
162-
162+
163163

164164

165165
def _find_macro (self, name):
@@ -352,7 +352,7 @@ def _fix_compile_args (self, output_dir, macros, include_dirs):
352352
else:
353353
raise TypeError, \
354354
"'include_dirs' (if supplied) must be a list of strings"
355-
355+
356356
return (output_dir, macros, include_dirs)
357357

358358
# _fix_compile_args ()
@@ -364,7 +364,7 @@ def _prep_compile (self, sources, output_dir):
364364
list of all object files and a dictionary telling which source
365365
files can be skipped.
366366
"""
367-
# Get the list of expected output (object) files
367+
# Get the list of expected output (object) files
368368
objects = self.object_filenames (sources,
369369
strip_dir=1,
370370
output_dir=output_dir)
@@ -401,7 +401,7 @@ def _fix_object_args (self, objects, output_dir):
401401
raise TypeError, \
402402
"'objects' must be a list or tuple of strings"
403403
objects = list (objects)
404-
404+
405405
if output_dir is None:
406406
output_dir = self.output_dir
407407
elif type (output_dir) is not StringType:
@@ -560,7 +560,7 @@ def create_static_lib (self,
560560
Raises LibError on failure.
561561
"""
562562
pass
563-
563+
564564

565565
# values for target_desc parameter in link()
566566
SHARED_OBJECT = "shared_object"
@@ -621,7 +621,7 @@ def link (self,
621621
"""
622622
raise NotImplementedError
623623

624-
624+
625625
# Old 'link_*()' methods, rewritten to use the new 'link()' method.
626626

627627
def link_shared_lib (self,
@@ -636,13 +636,13 @@ def link_shared_lib (self,
636636
extra_preargs=None,
637637
extra_postargs=None,
638638
build_temp=None):
639-
self.link(CCompiler.SHARED_LIBRARY, objects,
639+
self.link(CCompiler.SHARED_LIBRARY, objects,
640640
self.library_filename(output_libname, lib_type='shared'),
641641
output_dir,
642642
libraries, library_dirs, runtime_library_dirs,
643643
export_symbols, debug,
644644
extra_preargs, extra_postargs, build_temp)
645-
645+
646646

647647
def link_shared_object (self,
648648
objects,
@@ -673,9 +673,9 @@ def link_executable (self,
673673
debug=0,
674674
extra_preargs=None,
675675
extra_postargs=None):
676-
self.link(CCompiler.EXECUTABLE, objects,
676+
self.link(CCompiler.EXECUTABLE, objects,
677677
self.executable_filename(output_progname), output_dir,
678-
libraries, library_dirs, runtime_library_dirs, None,
678+
libraries, library_dirs, runtime_library_dirs, None,
679679
debug, extra_preargs, extra_postargs, None)
680680

681681

@@ -846,12 +846,12 @@ def mkpath (self, name, mode=0777):
846846
# on a cygwin built python we can use gcc like an ordinary UNIXish
847847
# compiler
848848
('cygwin.*', 'unix'),
849-
849+
850850
# OS name mappings
851851
('posix', 'unix'),
852852
('nt', 'msvc'),
853853
('mac', 'mwerks'),
854-
854+
855855
)
856856

857857
def get_default_compiler(osname=None, platform=None):
@@ -901,15 +901,15 @@ def show_compilers():
901901
# XXX this "knows" that the compiler option it's describing is
902902
# "--compiler", which just happens to be the case for the three
903903
# commands that use it.
904-
from distutils.fancy_getopt import FancyGetopt
904+
from distutils.fancy_getopt import FancyGetopt
905905
compilers = []
906906
for compiler in compiler_class.keys():
907907
compilers.append(("compiler="+compiler, None,
908908
compiler_class[compiler][2]))
909909
compilers.sort()
910910
pretty_printer = FancyGetopt(compilers)
911911
pretty_printer.print_help("List of available compilers:")
912-
912+
913913

914914
def new_compiler (plat=None,
915915
compiler=None,
@@ -932,14 +932,14 @@ def new_compiler (plat=None,
932932
try:
933933
if compiler is None:
934934
compiler = get_default_compiler(plat)
935-
935+
936936
(module_name, class_name, long_description) = compiler_class[compiler]
937937
except KeyError:
938938
msg = "don't know how to compile C/C++ code on platform '%s'" % plat
939939
if compiler is not None:
940940
msg = msg + " with '%s' compiler" % compiler
941941
raise DistutilsPlatformError, msg
942-
942+
943943
try:
944944
module_name = "distutils." + module_name
945945
__import__ (module_name)

Lib/distutils/cmd.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class Command:
4141
# current situation. (Eg. we "install_headers" is only applicable if
4242
# we have any C header files to install.) If 'predicate' is None,
4343
# that command is always applicable.
44-
#
44+
#
4545
# 'sub_commands' is usually defined at the *end* of a class, because
4646
# predicates can be unbound methods, so they must already have been
4747
# defined. The canonical example is the "install" command.
@@ -111,7 +111,7 @@ def ensure_finalized (self):
111111
if not self.finalized:
112112
self.finalize_options()
113113
self.finalized = 1
114-
114+
115115

116116
# Subclasses must define:
117117
# initialize_options()
@@ -133,12 +133,12 @@ def initialize_options (self):
133133
command-line. Thus, this is not the place to code dependencies
134134
between options; generally, 'initialize_options()' implementations
135135
are just a bunch of "self.foo = None" assignments.
136-
136+
137137
This method must be implemented by all command classes.
138138
"""
139139
raise RuntimeError, \
140140
"abstract method -- subclass %s must override" % self.__class__
141-
141+
142142
def finalize_options (self):
143143
"""Set final values for all the options that this command supports.
144144
This is always called as late as possible, ie. after any option
@@ -198,12 +198,12 @@ def debug_print (self, msg):
198198
if DEBUG:
199199
print msg
200200
sys.stdout.flush()
201-
201+
202202

203203

204204
# -- Option validation methods -------------------------------------
205205
# (these are very handy in writing the 'finalize_options()' method)
206-
#
206+
#
207207
# NB. the general philosophy here is to ensure that a particular option
208208
# value meets certain type and value constraints. If not, we try to
209209
# force it into conformance (eg. if we expect a list but have a string,
@@ -252,7 +252,7 @@ def ensure_string_list (self, option):
252252
raise DistutilsOptionError, \
253253
"'%s' must be a list of strings (got %s)" % \
254254
(option, `val`)
255-
255+
256256
def _ensure_tested_string (self, option, tester,
257257
what, error_fmt, default=None):
258258
val = self._ensure_stringlike(option, what, default)
@@ -382,7 +382,7 @@ def copy_tree (self, infile, outfile,
382382
and force flags.
383383
"""
384384
return dir_util.copy_tree(
385-
infile, outfile,
385+
infile, outfile,
386386
preserve_mode,preserve_times,preserve_symlinks,
387387
not self.force,
388388
self.verbose >= level,
@@ -426,7 +426,7 @@ def make_file (self, infiles, outfile, func, args,
426426
(outfile, string.join(infiles, ', '))
427427
if skip_msg is None:
428428
skip_msg = "skipping %s (inputs unchanged)" % outfile
429-
429+
430430

431431
# Allow 'infiles' to be a single string
432432
if type(infiles) is StringType:
@@ -459,7 +459,7 @@ class install_misc (Command):
459459
"""Common base class for installing some files in a subdirectory.
460460
Currently used by install_data and install_scripts.
461461
"""
462-
462+
463463
user_options = [('install-dir=', 'd', "directory to install the files to")]
464464

465465
def initialize_options (self):

Lib/distutils/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ class found in 'cmdclass' is used in place of the default, which is
108108
# Find and parse the config file(s): they will override options from
109109
# the setup script, but be overridden by the command line.
110110
dist.parse_config_files()
111-
111+
112112
if DEBUG:
113113
print "options (after parsing config files):"
114114
dist.dump_option_dicts()
@@ -146,7 +146,7 @@ class found in 'cmdclass' is used in place of the default, which is
146146
raise
147147
else:
148148
raise SystemExit, error
149-
149+
150150
except (DistutilsExecError,
151151
DistutilsFileError,
152152
DistutilsOptionError,

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/python/cpython/commit/b94b849d65af71b4b432a74fdaef8ccd88209cc0

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy