diff options
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 12 |
1 files changed, 3 insertions, 9 deletions
@@ -132,21 +132,15 @@ class MyBuildPy(build_py): else: base = modname basedir = os.path.join(self.build_lib, base) - if sys.platform == 'win32': - two_to_three = [sys.executable] - exe_path = os.path.dirname(sys.executable) - two_to_three.append(os.path.join(exe_path, 'Tools\\Scripts\\2to3.py')) - else: - two_to_three = ['2to3'] for directory in include_dirs: dest = join(basedir, directory) shutil.rmtree(dest, ignore_errors=True) shutil.copytree(directory, dest) if sys.version_info >= (3, 0): # process manually python file in include_dirs (test data) - from subprocess import check_call - print('running 2to3 on', dest) # parens are NOT optional here for py3k compat - check_call(two_to_three + ['-wn', dest]) + from distutils.util import run_2to3 + print('running 2to3 on', dest) + run_2to3([dest]) def install(**kwargs): """setup entry point""" |