1818__revision__ = "$Id$"
1919
2020import os , sys
21- from types import *
21+ from types import StringType , NoneType
2222from copy import copy
23+
2324from distutils import sysconfig
2425from distutils .dep_util import newer
2526from distutils .ccompiler import \
4344# should just happily stuff them into the preprocessor/compiler/linker
4445# options and carry on.
4546
46-
47- class UnixCCompiler (CCompiler ):
47+ class UnixCCompiler (CCompiler ):
4848
4949 compiler_type = 'unix'
5050
@@ -85,8 +85,7 @@ def __init__(self,
8585 verbose = 0 ,
8686 dry_run = 0 ,
8787 force = 0 ):
88- CCompiler .__init__ (self , verbose , dry_run , force )
89-
88+ CCompiler .__init__ (self , verbose , dry_run , force )
9089
9190 def preprocess (self ,
9291 source ,
@@ -95,7 +94,6 @@ def preprocess(self,
9594 include_dirs = None ,
9695 extra_preargs = None ,
9796 extra_postargs = None ):
98-
9997 (_ , macros , include_dirs ) = \
10098 self ._fix_compile_args (None , macros , include_dirs )
10199 pp_opts = gen_preprocess_options (macros , include_dirs )
@@ -119,7 +117,6 @@ def preprocess(self,
119117 except DistutilsExecError , msg :
120118 raise CompileError , msg
121119
122-
123120 def compile (self ,
124121 sources ,
125122 output_dir = None ,
@@ -128,7 +125,6 @@ def compile(self,
128125 debug = 0 ,
129126 extra_preargs = None ,
130127 extra_postargs = None ):
131-
132128 (output_dir , macros , include_dirs ) = \
133129 self ._fix_compile_args (output_dir , macros , include_dirs )
134130 (objects , skip_sources ) = self ._prep_compile (sources , output_dir )
@@ -161,15 +157,11 @@ def compile(self,
161157 # Return *all* object filenames, not just the ones we just built.
162158 return objects
163159
164- # compile ()
165-
166-
167160 def create_static_lib (self ,
168161 objects ,
169162 output_libname ,
170163 output_dir = None ,
171164 debug = 0 ):
172-
173165 (objects , output_dir ) = self ._fix_object_args (objects , output_dir )
174166
175167 output_filename = \
@@ -194,9 +186,6 @@ def create_static_lib(self,
194186 else :
195187 log .debug ("skipping %s (up-to-date)" , output_filename )
196188
197- # create_static_lib ()
198-
199-
200189 def link (self ,
201190 target_desc ,
202191 objects ,
@@ -210,7 +199,6 @@ def link(self,
210199 extra_preargs = None ,
211200 extra_postargs = None ,
212201 build_temp = None ):
213-
214202 (objects , output_dir ) = self ._fix_object_args (objects , output_dir )
215203 (libraries , library_dirs , runtime_library_dirs ) = \
216204 self ._fix_lib_args (libraries , library_dirs , runtime_library_dirs )
@@ -243,9 +231,6 @@ def link(self,
243231 else :
244232 log .debug ("skipping %s (up-to-date)" , output_filename )
245233
246- # link ()
247-
248-
249234 # -- Miscellaneous methods -----------------------------------------
250235 # These are all used by the 'gen_lib_options() function, in
251236 # ccompiler.py.
@@ -275,9 +260,7 @@ def runtime_library_dir_option(self, dir):
275260 def library_option (self , lib ):
276261 return "-l" + lib
277262
278-
279263 def find_library_file (self , dirs , lib , debug = 0 ):
280-
281264 for dir in dirs :
282265 shared = os .path .join (
283266 dir , self .library_filename (lib , lib_type = 'shared' ))
@@ -300,7 +283,3 @@ def find_library_file(self, dirs, lib, debug=0):
300283 else :
301284 # Oops, didn't find it in *any* of 'dirs'
302285 return None
303-
304- # find_library_file ()
305-
306- # class UnixCCompiler
0 commit comments