Commit d03783ff authored by Petr Viktorin's avatar Petr Viktorin

Use an explicit list of 2to3 fixers

parent 7c3ca028
lib2to3.fixes.fix_apply
lib2to3.fixes.fix_basestring
lib2to3.fixes.fix_buffer
lib2to3.fixes.fix_callable
lib2to3.fixes.fix_dict
lib2to3.fixes.fix_except
lib2to3.fixes.fix_exec
lib2to3.fixes.fix_execfile
lib2to3.fixes.fix_exitfunc
lib2to3.fixes.fix_filter
lib2to3.fixes.fix_funcattrs
lib2to3.fixes.fix_future
lib2to3.fixes.fix_getcwdu
lib2to3.fixes.fix_has_key
lib2to3.fixes.fix_idioms
lib2to3.fixes.fix_import
lib2to3.fixes.fix_imports
lib2to3.fixes.fix_imports2
lib2to3.fixes.fix_input
lib2to3.fixes.fix_intern
lib2to3.fixes.fix_isinstance
lib2to3.fixes.fix_itertools
lib2to3.fixes.fix_itertools_imports
lib2to3.fixes.fix_long
lib2to3.fixes.fix_map
lib2to3.fixes.fix_metaclass
lib2to3.fixes.fix_methodattrs
lib2to3.fixes.fix_ne
lib2to3.fixes.fix_nonzero
lib2to3.fixes.fix_numliterals
lib2to3.fixes.fix_operator
lib2to3.fixes.fix_paren
lib2to3.fixes.fix_print
lib2to3.fixes.fix_raise
lib2to3.fixes.fix_raw_input
lib2to3.fixes.fix_reduce
lib2to3.fixes.fix_renames
lib2to3.fixes.fix_repr
lib2to3.fixes.fix_set_literal
lib2to3.fixes.fix_standarderror
lib2to3.fixes.fix_sys_exc
lib2to3.fixes.fix_throw
lib2to3.fixes.fix_tuple_params
lib2to3.fixes.fix_types
lib2to3.fixes.fix_unicode
lib2to3.fixes.fix_urllib
lib2to3.fixes.fix_ws_comma
lib2to3.fixes.fix_xrange
lib2to3.fixes.fix_xreadlines
lib2to3.fixes.fix_zip
...@@ -1573,9 +1573,8 @@ def refactor_for_py3(distdir, cy3_dir): ...@@ -1573,9 +1573,8 @@ def refactor_for_py3(distdir, cy3_dir):
# need to convert Cython sources first # need to convert Cython sources first
import lib2to3.refactor import lib2to3.refactor
from distutils.util import copydir_run_2to3 from distutils.util import copydir_run_2to3
fixers = [ fix for fix in lib2to3.refactor.get_fixers_from_package("lib2to3.fixes") with open('2to3-fixers.txt') as f:
if fix.split('fix_')[-1] not in ('next',) fixers = [line.strip() for line in f if line.strip()]
]
if not os.path.exists(cy3_dir): if not os.path.exists(cy3_dir):
os.makedirs(cy3_dir) os.makedirs(cy3_dir)
import distutils.log as dlog import distutils.log as dlog
......
...@@ -39,9 +39,8 @@ if sys.version_info[0] >= 3: ...@@ -39,9 +39,8 @@ if sys.version_info[0] >= 3:
from distutils.command.build_py \ from distutils.command.build_py \
import build_py_2to3 as build_py import build_py_2to3 as build_py
# need to convert sources to Py3 on installation # need to convert sources to Py3 on installation
fixers = [ fix for fix in lib2to3.refactor.get_fixers_from_package("lib2to3.fixes") with open('2to3-fixers.txt') as f:
if fix.split('fix_')[-1] not in ('next',) fixers = [line.strip() for line in f if line.strip()]
]
build_py.fixer_names = fixers build_py.fixer_names = fixers
add_command_class("build_py", build_py) add_command_class("build_py", build_py)
......
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