diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2008-03-22 22:07:43 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2008-03-22 22:07:43 (GMT) |
commit | 84f4dfd3f68d7a5501ad407fc11502f2b8b20f09 (patch) | |
tree | 2aa1db23556e928b2594d415bba87688333741f6 /Lib/distutils/command/build_py.py | |
parent | 5021ebc892ebc831cf3ec5b9de2c70717a08b074 (diff) | |
download | cpython-84f4dfd3f68d7a5501ad407fc11502f2b8b20f09.zip cpython-84f4dfd3f68d7a5501ad407fc11502f2b8b20f09.tar.gz cpython-84f4dfd3f68d7a5501ad407fc11502f2b8b20f09.tar.bz2 |
Invoke byte-compilation after running 2to3.
Diffstat (limited to 'Lib/distutils/command/build_py.py')
-rw-r--r-- | Lib/distutils/command/build_py.py | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Lib/distutils/command/build_py.py b/Lib/distutils/command/build_py.py index f39ffb8..09f6d23 100644 --- a/Lib/distutils/command/build_py.py +++ b/Lib/distutils/command/build_py.py @@ -386,9 +386,17 @@ class build_py (Command): class build_py_2to3(build_py): def run(self): - from lib2to3.refactor import RefactoringTool self.updated_files = [] - build_py.run(self) + + # Base class code + if self.py_modules: + self.build_modules() + if self.packages: + self.build_packages() + self.build_package_data() + + # 2to3 + from lib2to3.refactor import RefactoringTool class Options: pass o = Options() @@ -401,6 +409,9 @@ class build_py_2to3(build_py): r = RefactoringTool(o) r.refactor_args(self.updated_files) + # Remaining base class code + self.byte_compile(self.get_outputs(include_bytecode=0)) + def build_module(self, module, module_file, package): res = build_py.build_module(self, module, module_file, package) if res[1]: |