21 # Start-of-Header |
21 # Start-of-Header |
22 name = "CxFreeze Plugin" |
22 name = "CxFreeze Plugin" |
23 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
23 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
24 autoactivate = True |
24 autoactivate = True |
25 deactivateable = True |
25 deactivateable = True |
26 version = "5.1.0" |
26 version = "5.1.1" |
27 className = "CxFreezePlugin" |
27 className = "CxFreezePlugin" |
28 packageName = "CxFreeze" |
28 packageName = "CxFreeze" |
29 shortDescription = "Show the CxFreeze dialogs." |
29 shortDescription = "Show the CxFreeze dialogs." |
30 longDescription = """This plugin implements the CxFreeze dialogs.""" \ |
30 longDescription = """This plugin implements the CxFreeze dialogs.""" \ |
31 """ CxFreeze is used to generate a distribution package.""" |
31 """ CxFreeze is used to generate a distribution package.""" |
127 exes.append(exe) |
127 exes.append(exe) |
128 |
128 |
129 # step 2: determine the Python 3 variant |
129 # step 2: determine the Python 3 variant |
130 found = False |
130 found = False |
131 if Utilities.isMacPlatform(): |
131 if Utilities.isMacPlatform(): |
132 checkStr = "Python.framework/Versions/3".lower() |
132 checkStrings = ["Python.framework/Versions/3".lower(), |
|
133 "python3"] |
133 else: |
134 else: |
134 checkStr = "python3" |
135 checkStrings = ["python3"] |
135 for exe in exes: |
136 for exe in exes: |
136 try: |
137 try: |
137 f = open(exe, "r") |
138 f = open(exe, "r") |
138 line0 = f.readline() |
139 line0 = f.readline() |
139 if checkStr in line0.lower(): |
140 for checkStr in checkStrings: |
140 found = True |
141 if checkStr in line0.lower(): |
|
142 found = True |
|
143 break |
141 finally: |
144 finally: |
142 f.close() |
145 f.close() |
143 if found: |
146 if found: |
144 return exe |
147 return exe |
145 |
148 |