]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix from Lyle Johnson: add the '--compiler' option.
authorGregory P. Smith <greg@mad-scientist.com>
Fri, 12 May 2000 00:33:14 +0000 (00:33 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Fri, 12 May 2000 00:33:14 +0000 (00:33 +0000)
Lib/distutils/command/build.py
Lib/distutils/command/build_clib.py

index 7fb0b566573ec2ff6a7aecddbc21345dfcedf5a0..7d753b11267b1114254034e16eacbd4545fb9641 100644 (file)
@@ -26,10 +26,12 @@ class build (Command):
          "build-purelib or build-platlib"),
         ('build-temp=', 't',
          "temporary build directory"),
+        ('compiler=', 'c',
+         "specify the compiler type"),
         ('debug', 'g',
          "compile extensions and libraries with debugging information"),
         ('force', 'f',
-         "forcibly build everything (ignore file timestamps"),
+         "forcibly build everything (ignore file timestamps)"),
         ]
 
     def initialize_options (self):
@@ -40,6 +42,7 @@ class build (Command):
         self.build_platlib = None
         self.build_lib = None
         self.build_temp = None
+        self.compiler = None
         self.debug = None
         self.force = 0
 
index 31170730e614bbc18dba87c81daf3a92c5ed58d2..681cd76b56e8dcefa1da48d68af885c050b2ebdc 100644 (file)
@@ -38,7 +38,9 @@ class build_clib (Command):
         ('debug', 'g',
          "compile with debugging information"),
         ('force', 'f',
-         "forcibly build everything (ignore file timestamps"),
+         "forcibly build everything (ignore file timestamps)"),
+        ('compiler=', 'c',
+         "specify the compiler type"),
         ]
 
     def initialize_options (self):
@@ -54,6 +56,7 @@ class build_clib (Command):
         self.undef = None
         self.debug = None
         self.force = 0
+        self.compiler = None
 
     # initialize_options()
 
@@ -68,6 +71,7 @@ class build_clib (Command):
         self.set_undefined_options ('build',
                                     ('build_temp', 'build_clib'),
                                     ('build_temp', 'build_temp'),
+                                    ('compiler', 'compiler'),
                                     ('debug', 'debug'),
                                     ('force', 'force'))
 
@@ -93,9 +97,11 @@ class build_clib (Command):
             return
 
         # Yech -- this is cut 'n pasted from build_ext.py!
-        self.compiler = new_compiler (verbose=self.verbose,
+        self.compiler = new_compiler (compiler=self.compiler,
+                                      verbose=self.verbose,
                                       dry_run=self.dry_run,
                                       force=self.force)
+
         if self.include_dirs is not None:
             self.compiler.set_include_dirs (self.include_dirs)
         if self.define is not None: