summaryrefslogtreecommitdiffstats
path: root/Lib/distutils/command/build_ext.py
diff options
context:
space:
mode:
authorGreg Ward <gward@python.net>1999-09-08 02:42:30 (GMT)
committerGreg Ward <gward@python.net>1999-09-08 02:42:30 (GMT)
commit71eb8644d7e27fd379a2cf78c509155bdb179332 (patch)
treeccbd4f67d746616284cb996b87810c6865a6d9b5 /Lib/distutils/command/build_ext.py
parent42926ddc7e413f7f14ad68b75f7a6fffe9d96733 (diff)
downloadcpython-71eb8644d7e27fd379a2cf78c509155bdb179332.zip
cpython-71eb8644d7e27fd379a2cf78c509155bdb179332.tar.gz
cpython-71eb8644d7e27fd379a2cf78c509155bdb179332.tar.bz2
Changed to reflect the new "command options" regime -- in particular,
we no longer explicitly pull distribution options out of our Distribution object, but rather let the Distribution put them into the command object.
Diffstat (limited to 'Lib/distutils/command/build_ext.py')
-rw-r--r--Lib/distutils/command/build_ext.py22
1 files changed, 15 insertions, 7 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
index a0464b4..a3982c1 100644
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -61,6 +61,7 @@ class BuildExt (Command):
def set_default_options (self):
+ self.extensions = None
self.dir = None
self.include_dirs = None
self.define = None
@@ -90,10 +91,14 @@ class BuildExt (Command):
def run (self):
self.set_final_options ()
- (extensions, package) = \
- self.distribution.get_options ('ext_modules', 'package')
- # 'extensions', as supplied by setup.py, is a list of 2-tuples.
+ # XXX we should care about the package we compile extensions
+ # into!
+
+ #(extensions, package) = \
+ # self.distribution.get_options ('ext_modules', 'package')
+
+ # 'self.extensions', as supplied by setup.py, is a list of 2-tuples.
# Each tuple is simple:
# (ext_name, build_info)
# build_info is a dictionary containing everything specific to
@@ -101,13 +106,16 @@ class BuildExt (Command):
# should be handled by general distutils options passed from
# setup.py down to right here, but that's not taken care of yet.)
+ if not self.extensions:
+ return
- # First, sanity-check the 'extensions' list
- self.check_extensions_list (extensions)
+ # First, sanity-check the 'self.extensions' list
+ self.check_extensions_list (self.extensions)
# Setup the CCompiler object that we'll use to do all the
# compiling and linking
- self.compiler = new_compiler (verbose=self.distribution.verbose,
+ self.compiler = new_compiler (plat=os.environ.get ('PLAT'),
+ verbose=self.distribution.verbose,
dry_run=self.distribution.dry_run)
if self.include_dirs is not None:
self.compiler.set_include_dirs (self.include_dirs)
@@ -128,7 +136,7 @@ class BuildExt (Command):
self.compiler.set_link_objects (self.link_objects)
# Now the real loop over extensions
- self.build_extensions (extensions)
+ self.build_extensions (self.extensions)