diff options
author | Greg Ward <gward@python.net> | 1999-09-21 18:27:55 (GMT) |
---|---|---|
committer | Greg Ward <gward@python.net> | 1999-09-21 18:27:55 (GMT) |
commit | 02e1c56212c29929be2be279b3af70c503e06d52 (patch) | |
tree | 8433c5afab62e8603bae7c5071a2bd4a6785f95a /Lib/distutils/command/build.py | |
parent | dbb96253eae8da10fc1ba4c445ff6f475dfd4cf9 (diff) | |
download | cpython-02e1c56212c29929be2be279b3af70c503e06d52.zip cpython-02e1c56212c29929be2be279b3af70c503e06d52.tar.gz cpython-02e1c56212c29929be2be279b3af70c503e06d52.tar.bz2 |
Only run build_py if we have pure Python modules, and build_ext if we
have extension modules.
Diffstat (limited to 'Lib/distutils/command/build.py')
-rw-r--r-- | Lib/distutils/command/build.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Lib/distutils/command/build.py b/Lib/distutils/command/build.py index 187dddc..b74e51c 100644 --- a/Lib/distutils/command/build.py +++ b/Lib/distutils/command/build.py @@ -40,10 +40,14 @@ class Build (Command): # For now, "build" means "build_py" then "build_ext". (Eventually # it should also build documentation.) - # Invoke the 'build_py' command - self.run_peer ('build_py') - - # And now 'build_ext' - self.run_peer ('build_ext') + # Invoke the 'build_py' command to "build" pure Python modules + # (ie. copy 'em into the build tree) + if self.distribution.packages or self.distribution.py_modules: + self.run_peer ('build_py') + + # And now 'build_ext' -- compile extension modules and put them + # into the build tree + if self.distribution.ext_modules: + self.run_peer ('build_ext') # end class Build |