From: Greg Ward Date: Tue, 21 Sep 1999 18:27:55 +0000 (+0000) Subject: Only run build_py if we have pure Python modules, and build_ext if we X-Git-Tag: v1.6a1~905 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=02e1c56212c29929be2be279b3af70c503e06d52;p=thirdparty%2FPython%2Fcpython.git Only run build_py if we have pure Python modules, and build_ext if we have extension modules. --- diff --git a/Lib/distutils/command/build.py b/Lib/distutils/command/build.py index 187dddc0b7cd..b74e51cfea27 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