Commit 143e8f4f authored by Martin v. Löwis's avatar Martin v. Löwis

Invoke byte-compilation after running 2to3.

parent dcf37973
......@@ -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]:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment