ProjectPyramid/Project.py

changeset 39
94e448a362b2
parent 37
1b089e0fba1e
child 44
989c961c33ab
--- a/ProjectPyramid/Project.py	Sat Feb 23 15:19:46 2013 +0100
+++ b/ProjectPyramid/Project.py	Tue Mar 26 16:45:40 2013 +0100
@@ -482,12 +482,23 @@
         python = "python"
         if isWindowsPlatform():
             python += ".exe"
+        else:
+            language = self.__e5project.getProjectLanguage()
+            if language == "Python3":
+                python = "python3"
+            elif language == "Python2":
+                python = "python2"
         virtualEnv = self.__getVirtualEnvironment()
         if virtualEnv:
             if isWindowsPlatform():
                 python = os.path.join(virtualEnv, "Scripts", python)
+                if not os.path.exists(python):
+                    python = os.path.join(virtualEnv, python)
             else:
                 python = os.path.join(virtualEnv, "bin", python)
+                if not os.path.exists(python):
+                    python = python[:-1]    # omit the version character
+        
         return python
     
     def __pyramidInfo(self):

eric ide

mercurial