Fixed an issue finding the right Python environments. release-3.3.1

Mon, 03 Feb 2014 18:52:43 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Mon, 03 Feb 2014 18:52:43 +0100
changeset 34
7b511ce3bc88
parent 33
d2b78ef8b216
child 35
c6f38139754c

Fixed an issue finding the right Python environments.

PluginProjectDjango.py file | annotate | diff | comparison | revisions
PluginProjectDjango.zip file | annotate | diff | comparison | revisions
ProjectDjango/Project.py file | annotate | diff | comparison | revisions
--- a/PluginProjectDjango.py	Sat Jan 25 17:43:52 2014 +0100
+++ b/PluginProjectDjango.py	Mon Feb 03 18:52:43 2014 +0100
@@ -28,7 +28,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "3.3.0"
+version = "3.3.1"
 className = "ProjectDjangoPlugin"
 packageName = "ProjectDjango"
 shortDescription = "Project support for Django projects."
Binary file PluginProjectDjango.zip has changed
--- a/ProjectDjango/Project.py	Sat Jan 25 17:43:52 2014 +0100
+++ b/ProjectDjango/Project.py	Mon Feb 03 18:52:43 2014 +0100
@@ -1097,13 +1097,21 @@
             language = self.__e5project.getProjectLanguage()
         if language == "Python3":
             debugEnv = Preferences.getDebugger("Python3Interpreter")
+            if not debugEnv and sys.version_info[0] == 3:
+                debugEnv = sys.executable
         elif language == "Python2":
             debugEnv = Preferences.getDebugger("PythonInterpreter")
+            if not debugEnv and sys.version_info[0] == 2:
+                debugEnv = sys.executable
         else:
             debugEnv = sys.executable
         debugEnv = os.path.dirname(debugEnv)
         if debugEnv and not os.path.exists(debugEnv):
-            debugEnv = sys.exec_prefix
+            if (language == "Python3" and sys.version_info[0] == 3) or \
+               (language == "Python2" and sys.version_info[0] == 2):
+                debugEnv = sys.exec_prefix
+            else:
+                debugEnv = ""
         return debugEnv
 
     def __getDjangoAdminCommand(self, language=""):

eric ide

mercurial