]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Add a configuration for python path
authorPhil Dibowitz <phild@fb.com>
Tue, 16 Apr 2013 22:09:55 +0000 (15:09 -0700)
committerPhil Dibowitz <phild@fb.com>
Tue, 16 Apr 2013 22:10:34 +0000 (15:10 -0700)
Test Plan: not a clue

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D5717

src/lint/linter/ArcanistPEP8Linter.php

index 215a8a43d4e9e7b9e247944064b218f5a7c956bd..346fd2ef9442d79559046b7c50e67d3102f7c8b5 100644 (file)
@@ -41,7 +41,7 @@ final class ArcanistPEP8Linter extends ArcanistFutureLinter {
     $bin = $working_copy->getConfig('lint.pep8.bin');
 
     if ($bin === null && $prefix === null) {
-      $bin = csprintf('/usr/bin/env python %s',
+      $bin = csprintf('/usr/bin/env python2.6 %s',
                phutil_get_library_root('arcanist').
                '/../externals/pep8/pep8.py');
     } else {
@@ -74,13 +74,6 @@ final class ArcanistPEP8Linter extends ArcanistFutureLinter {
       }
     }
 
-    list(, $stderr) = execx('/usr/bin/env python -V');
-    if ($stderr < 'Python 2.5') {
-      throw new ArcanistUsageException(
-        "Python 2.5 or greater is required to run the PEP8 Python linter, but ".
-        rtrim($stderr)." was found instead.");
-    }
-
     return $bin;
   }