From 532ec30d00ddc0a1da31e3fecb542efcb04a781b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 20 Jan 2015 22:56:25 +0100 Subject: [PATCH] Fix executing of virtualenv pylint on Windows. 6a7e454789b8b47ad58b8261b32a69f9f0bc592c broke executing pylint on Windows, because there was a pylint Python script in vev\Scripts, and subprocess tried to execute that instead of the .exe. --- scripts/run_checks.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/run_checks.py b/scripts/run_checks.py index 0e0b97bb7..d648f1abd 100755 --- a/scripts/run_checks.py +++ b/scripts/run_checks.py @@ -91,8 +91,12 @@ def run(name, target=None, print_version=False): if target is not None: args.append(target) with _adjusted_pythonpath(name): + if os.name == 'nt': + exename = name + '.exe' + else: + exename = name # for virtualenvs - executable = os.path.join(os.path.dirname(sys.executable), name) + executable = os.path.join(os.path.dirname(sys.executable), exename) if not os.path.exists(executable): # in $PATH executable = name