Added code to search the executable in virtual environment as well on Windows platforms. release-6.2.0

Mon, 04 May 2020 17:51:25 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 04 May 2020 17:51:25 +0200
changeset 83
59597e4c8fa9
parent 82
5493d105d329
child 84
022f0bc87198

Added code to search the executable in virtual environment as well on Windows platforms.

ChangeLog file | annotate | diff | comparison | revisions
PluginPyLint.py file | annotate | diff | comparison | revisions
PluginPyLint.zip file | annotate | diff | comparison | revisions
--- a/ChangeLog	Wed Jan 01 11:58:51 2020 +0100
+++ b/ChangeLog	Mon May 04 17:51:25 2020 +0200
@@ -1,5 +1,9 @@
 ChangeLog
 ---------
+Version 6.2.0
+- added code to search the executable in virtual environment as well on
+  Windows platforms
+
 Version 6.1.11:
 - updated Russian translations
 
--- a/PluginPyLint.py	Wed Jan 01 11:58:51 2020 +0100
+++ b/PluginPyLint.py	Mon May 04 17:51:25 2020 +0200
@@ -35,7 +35,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "6.1.11"
+version = "6.2.0"
 className = "PyLintPlugin"
 packageName = "PyLint"
 shortDescription = "Show the PyLint dialogs."
@@ -70,7 +70,7 @@
         "versionStartsWith": 'dummypylint',
         "versionPosition": -1,
         "version": "",
-        "versionCleanup": (0, -1),
+        "versionCleanup": None,
     }
     if _checkProgram():
         for exePath in (exePy2[0], exePy3[0]):
@@ -103,7 +103,6 @@
         for line in output.splitlines():
             if versionRe.search(line):
                 version = line.split()[-1]
-                version = version[:-1]
                 break
     return version
 
@@ -187,6 +186,18 @@
                     if exePaths:
                         for exePath in exePaths:
                             executables.add(exePath)
+        
+        if not executables and majorVersion >= 3:
+            # check the PATH environment variable if nothing was found
+            # Python 3 only
+            path = Utilities.getEnvironmentEntry('PATH')
+            if path:
+                dirs = path.split(os.pathsep)
+                for directory in dirs:
+                    for suffix in (".bat", ".exe"):
+                        exe = os.path.join(directory, "pylint" + suffix)
+                        if os.access(exe, os.X_OK):
+                            executables.add(exe)
     else:
         #
         # Linux, Unix ...
Binary file PluginPyLint.zip has changed

eric ide

mercurial