Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4311dc8

Browse files
committed
Don't convert pyparsing_py3 through 2to3
1 parent 57d3a12 commit 4311dc8

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

setup.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,15 @@ def add_dateutil():
252252
if options['verbose']:
253253
mod.extra_compile_args.append('-DVERBOSE')
254254

255+
if sys.version_info[0] >= 3:
256+
# We need to skip certain files that have already been
257+
# converted to Python 3.x
258+
original_build_py = build_py
259+
class build_py(original_build_py):
260+
def run_2to3(self, files):
261+
filtered = [x for x in files if 'py3' not in x]
262+
original_build_py.run_2to3(self, filtered)
263+
255264
print_raw("pymods %s" % py_modules)
256265
print_raw("packages %s" % packages)
257266
distrib = setup(name="matplotlib",

0 commit comments

Comments
 (0)