Enhanced the algorithm to determine the pylint executable on non-Windows systems. release-5.0.2

Fri, 18 May 2012 16:00:19 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 18 May 2012 16:00:19 +0200
changeset 8
b126b60ac32a
parent 7
cda98d0e93e7
child 9
7b4edecdaf31

Enhanced the algorithm to determine the pylint executable on non-Windows systems.

ChangeLog file | annotate | diff | comparison | revisions
PluginPyLint.e4p file | annotate | diff | comparison | revisions
PluginPyLint.py file | annotate | diff | comparison | revisions
PluginPyLint.zip file | annotate | diff | comparison | revisions
--- a/ChangeLog	Sat Apr 14 14:42:31 2012 +0200
+++ b/ChangeLog	Fri May 18 16:00:19 2012 +0200
@@ -2,6 +2,9 @@
 ---------
 Version 5.0.1:
 - bug fixes
+
+Version 5.0.1:
+- bug fixes
 - added a page to the config dialog to enable and diable messages
 
 Version 5.0.0:
--- a/PluginPyLint.e4p	Sat Apr 14 14:42:31 2012 +0200
+++ b/PluginPyLint.e4p	Fri May 18 16:00:19 2012 +0200
@@ -6,7 +6,7 @@
   <Hash>abcf6641287ab95ca3df062cd9840dd92df2e42f</Hash>
   <ProgLanguage mixed="0">Python3</ProgLanguage>
   <ProjectType>E4Plugin</ProjectType>
-  <Description>This plugin implements an eric4 interface to the pylint checker.</Description>
+  <Description>This plugin implements an eric5 interface to the pylint checker.</Description>
   <Version>5.0.x</Version>
   <Author>Detlev Offenbach</Author>
   <Email>detlev@die-offenbachs.de</Email>
@@ -136,16 +136,16 @@
     </VcsOtherData>
   </Vcs>
   <FiletypeAssociations>
-    <FiletypeAssociation pattern="*.ui" type="FORMS"/>
     <FiletypeAssociation pattern="*.idl" type="INTERFACES"/>
-    <FiletypeAssociation pattern="*.qm" type="TRANSLATIONS"/>
-    <FiletypeAssociation pattern="Ui_*.py" type="__IGNORE__"/>
     <FiletypeAssociation pattern="*.ptl" type="SOURCES"/>
+    <FiletypeAssociation pattern="*.py" type="SOURCES"/>
     <FiletypeAssociation pattern="*.pyw" type="SOURCES"/>
-    <FiletypeAssociation pattern="*.ui.h" type="FORMS"/>
+    <FiletypeAssociation pattern="*.qm" type="TRANSLATIONS"/>
+    <FiletypeAssociation pattern="*.qrc" type="RESOURCES"/>
     <FiletypeAssociation pattern="*.ts" type="TRANSLATIONS"/>
-    <FiletypeAssociation pattern="*.py" type="SOURCES"/>
-    <FiletypeAssociation pattern="*.qrc" type="RESOURCES"/>
+    <FiletypeAssociation pattern="*.ui" type="FORMS"/>
+    <FiletypeAssociation pattern="*.ui.h" type="FORMS"/>
+    <FiletypeAssociation pattern="Ui_*.py" type="__IGNORE__"/>
   </FiletypeAssociations>
   <Documentation>
     <DocumentationParams>
--- a/PluginPyLint.py	Sat Apr 14 14:42:31 2012 +0200
+++ b/PluginPyLint.py	Fri May 18 16:00:19 2012 +0200
@@ -28,7 +28,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "5.0.1"
+version = "5.0.2"
 className = "PyLintPlugin"
 packageName = "PyLint"
 shortDescription = "Show the PyLint dialogs."
@@ -113,6 +113,9 @@
         #
         # Linux, Unix ...
         pylintScript = 'pylint'
+        scriptSuffixes = ["",
+                          "-python{0}".format(sys.version[:1]),
+                          "-python{0}".format(sys.version[:3])]
         # There could be multiple pylint executables in the path
         # e.g. for different python variants
         path = Utilities.getEnvironmentEntry('PATH')
@@ -124,9 +127,10 @@
         exes = []
         dirs = path.split(os.pathsep)
         for dir in dirs:
-            exe = os.path.join(dir, pylintScript)
-            if os.access(exe, os.X_OK):
-                exes.append(exe)
+            for suffix in scriptSuffixes:
+                exe = os.path.join(dir, pylintScript + suffix)
+                if os.access(exe, os.X_OK):
+                    exes.append(exe)
         
         # step 2: determine the Python 3 variant
         found = False
Binary file PluginPyLint.zip has changed

eric ide

mercurial