diff options
author | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2013-10-03 16:31:51 +0200 |
---|---|---|
committer | Sylvain Thénault <sylvain.thenault@logilab.fr> | 2013-10-03 16:31:51 +0200 |
commit | 33a2abbac9251557bc065cace47f43a2997bedcc (patch) | |
tree | 5f726cec92db6944ad034a69bf7a1263beff446c /setup.py | |
parent | 9e066881ffaacc4df1d7d470df0324ea57ee5aff (diff) | |
download | astroid-git-33a2abbac9251557bc065cace47f43a2997bedcc.tar.gz |
backport fix done by Tobias Rzepka on pylint for python3 install on win32 platforms
Diffstat (limited to 'setup.py')
-rw-r--r-- | setup.py | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -132,7 +132,13 @@ class MyBuildPy(build_py): else: base = modname basedir = os.path.join(self.build_lib, base) - for directory in include_dirs: + 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_idirs: dest = join(basedir, directory) shutil.rmtree(dest, ignore_errors=True) shutil.copytree(directory, dest) @@ -140,7 +146,7 @@ class MyBuildPy(build_py): # 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(['2to3', '-wn', dest]) + check_call(two_to_three + ['-wn', dest]) def install(**kwargs): """setup entry point""" |