Fixed an issue locating the cxfreeze executable on Mac OS X and the list of init-scripts containing a .py extension.

Sun, 28 Apr 2013 18:03:38 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 28 Apr 2013 18:03:38 +0200
changeset 41
394efa0e059c
parent 38
31dcf0f6b684
child 42
9bc065cde412

Fixed an issue locating the cxfreeze executable on Mac OS X and the list of init-scripts containing a .py extension.

ChangeLog file | annotate | diff | comparison | revisions
CxFreeze/CxfreezeConfigDialog.py file | annotate | diff | comparison | revisions
PluginCxFreeze.py file | annotate | diff | comparison | revisions
PluginCxFreeze.zip file | annotate | diff | comparison | revisions
--- a/ChangeLog	Sat Feb 23 15:15:15 2013 +0100
+++ b/ChangeLog	Sun Apr 28 18:03:38 2013 +0200
@@ -1,5 +1,8 @@
 ChangeLog
 ---------
+Version 5.1.1:
+- bug fix
+
 Version 5.1.0:
 - bug fix
 - modified code to do lazy import
--- a/CxFreeze/CxfreezeConfigDialog.py	Sat Feb 23 15:15:15 2013 +0100
+++ b/CxFreeze/CxfreezeConfigDialog.py	Sun Apr 28 18:03:38 2013 +0200
@@ -79,7 +79,7 @@
             d = QDir(os.path.join(modpath, 'initscripts'))
             initList = d.entryList(['*.py'])
             initList.insert(0, '')
-            self.initscriptCombo.addItems(initList)
+            self.initscriptCombo.addItems([os.path.splitext(i)[0] for i in initList])
         
         self.targetDirCompleter = E5DirCompleter(self.targetDirEdit)
         self.extListFileCompleter = E5FileCompleter(self.extListFileEdit)
--- a/PluginCxFreeze.py	Sat Feb 23 15:15:15 2013 +0100
+++ b/PluginCxFreeze.py	Sun Apr 28 18:03:38 2013 +0200
@@ -23,7 +23,7 @@
 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
 autoactivate = True
 deactivateable = True
-version = "5.1.0"
+version = "5.1.1"
 className = "CxFreezePlugin"
 packageName = "CxFreeze"
 shortDescription = "Show the CxFreeze dialogs."
@@ -129,15 +129,18 @@
         # step 2: determine the Python 3 variant
         found = False
         if Utilities.isMacPlatform():
-            checkStr = "Python.framework/Versions/3".lower()
+            checkStrings = ["Python.framework/Versions/3".lower(),
+                            "python3"]
         else:
-            checkStr = "python3"
+            checkStrings = ["python3"]
         for exe in exes:
             try:
                 f = open(exe, "r")
                 line0 = f.readline()
-                if checkStr in line0.lower():
-                    found = True
+                for checkStr in checkStrings:
+                    if checkStr in line0.lower():
+                        found = True
+                        break
             finally:
                 f.close()
             if found:
Binary file PluginCxFreeze.zip has changed

eric ide

mercurial