diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2008-03-22 22:07:43 +0000 |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2008-03-22 22:07:43 +0000 |
| commit | 143e8f4fe669de9fb9e1ed23be226c7a4b6b410a (patch) | |
| tree | 6ee84da4039401634cf56c58f663fc07dd0ace97 /command/build_py.py | |
| parent | dcf379739cccd5c8dd0d9a606ab52239e659d154 (diff) | |
| download | python-setuptools-git-143e8f4fe669de9fb9e1ed23be226c7a4b6b410a.tar.gz | |
Invoke byte-compilation after running 2to3.
Diffstat (limited to 'command/build_py.py')
| -rw-r--r-- | command/build_py.py | 15 |
1 files changed, 13 insertions, 2 deletions
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]: |
