diff --git a/src/lint/linter/ArcanistPEP8Linter.php b/src/lint/linter/ArcanistPEP8Linter.php index bc644c63..735cfcfd 100644 --- a/src/lint/linter/ArcanistPEP8Linter.php +++ b/src/lint/linter/ArcanistPEP8Linter.php @@ -45,7 +45,7 @@ final class ArcanistPEP8Linter extends ArcanistLinter { $bin = $working_copy->getConfig('lint.pep8.bin'); if ($bin === null && $prefix === null) { - $bin = csprintf('/usr/bin/env python2.6 %s', + $bin = csprintf('/usr/bin/env python %s', phutil_get_library_root('arcanist'). '/../externals/pep8/pep8.py'); } else { diff --git a/src/lint/linter/ArcanistPyFlakesLinter.php b/src/lint/linter/ArcanistPyFlakesLinter.php index 7f9bb842..3ae6cdc3 100644 --- a/src/lint/linter/ArcanistPyFlakesLinter.php +++ b/src/lint/linter/ArcanistPyFlakesLinter.php @@ -35,7 +35,7 @@ final class ArcanistPyFlakesLinter extends ArcanistLinter { // Default to just finding pyflakes in the users path $pyflakes_bin = 'pyflakes'; - $python_path = ''; + $python_path = array(); // If a pyflakes path was specified, then just use that as the // pyflakes binary and assume that the libraries will be imported @@ -50,9 +50,13 @@ final class ArcanistPyFlakesLinter extends ArcanistLinter { $pyflakes_bin = $pyflakes_path; } else if ($pyflakes_prefix !== null) { $pyflakes_bin = $pyflakes_prefix.'/bin/pyflakes'; - $python_path = $pyflakes_prefix.'/lib/python2.6/site-packages:'; + $python_path[] = $pyflakes_prefix.'/lib/python2.7/site-packages'; + $python_path[] = $pyflakes_prefix.'/lib/python2.7/dist-packages'; + $python_path[] = $pyflakes_prefix.'/lib/python2.6/site-packages'; + $python_path[] = $pyflakes_prefix.'/lib/python2.6/dist-packages'; } - + $python_path[] = ''; + $python_path = implode(':', $python_path); $options = $this->getPyFlakesOptions(); $f = new ExecFuture( diff --git a/src/lint/linter/ArcanistPyLintLinter.php b/src/lint/linter/ArcanistPyLintLinter.php index 618014ad..88b45c18 100644 --- a/src/lint/linter/ArcanistPyLintLinter.php +++ b/src/lint/linter/ArcanistPyLintLinter.php @@ -133,7 +133,10 @@ final class ArcanistPyLintLinter extends ArcanistLinter { $python_path = array(); foreach ($prefixes as $prefix) { if ($prefix !== null) { + $python_path[] = $prefix.'/lib/python2.7/site-packages'; + $python_path[] = $prefix.'/lib/python2.7/dist-packages'; $python_path[] = $prefix.'/lib/python2.6/site-packages'; + $python_path[] = $prefix.'/lib/python2.6/dist-packages'; } }