From 143e8f4fe669de9fb9e1ed23be226c7a4b6b410a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Sat, 22 Mar 2008 22:07:43 +0000 Subject: Invoke byte-compilation after running 2to3. --- command/build_py.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'command/build_py.py') diff --git a/command/build_py.py b/command/build_py.py index f39ffb87..09f6d233 100644 --- a/command/build_py.py +++ b/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]: -- cgit v1.2.1