PluginCxFreeze.py

changeset 33
2a3b4b7a633f
parent 32
41ddd8e1c06d
child 34
caf61887223e
equal deleted inserted replaced
32:41ddd8e1c06d 33:2a3b4b7a633f
24 # Start-of-Header 24 # Start-of-Header
25 name = "CxFreeze Plugin" 25 name = "CxFreeze Plugin"
26 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 26 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
27 autoactivate = True 27 autoactivate = True
28 deactivateable = True 28 deactivateable = True
29 version = "5.0.6" 29 version = "5.0.7"
30 className = "CxFreezePlugin" 30 className = "CxFreezePlugin"
31 packageName = "CxFreeze" 31 packageName = "CxFreeze"
32 shortDescription = "Show the CxFreeze dialogs." 32 shortDescription = "Show the CxFreeze dialogs."
33 longDescription = """This plugin implements the CxFreeze dialogs.""" \ 33 longDescription = """This plugin implements the CxFreeze dialogs.""" \
34 """ CxFreeze is used to generate a distribution package.""" 34 """ CxFreeze is used to generate a distribution package."""
108 return exePath 108 return exePath
109 else: 109 else:
110 # 110 #
111 # Linux, Unix ... 111 # Linux, Unix ...
112 cxfreezeScript = 'cxfreeze' 112 cxfreezeScript = 'cxfreeze'
113 scriptSuffixes = ["",
114 "-python{0}".format(sys.version[:1]),
115 "-python{0}".format(sys.version[:3])]
113 # There could be multiple cxfreeze executables in the path 116 # There could be multiple cxfreeze executables in the path
114 # e.g. for different python variants 117 # e.g. for different python variants
115 path = Utilities.getEnvironmentEntry('PATH') 118 path = Utilities.getEnvironmentEntry('PATH')
116 # environment variable not defined 119 # environment variable not defined
117 if path is None: 120 if path is None:
119 122
120 # step 1: determine possible candidates 123 # step 1: determine possible candidates
121 exes = [] 124 exes = []
122 dirs = path.split(os.pathsep) 125 dirs = path.split(os.pathsep)
123 for dir in dirs: 126 for dir in dirs:
124 exe = os.path.join(dir, cxfreezeScript) 127 for suffix in scriptSuffixes:
125 if os.access(exe, os.X_OK): 128 exe = os.path.join(dir, cxfreezeScript + suffix)
126 exes.append(exe) 129 if os.access(exe, os.X_OK):
130 exes.append(exe)
127 131
128 # step 2: determine the Python 3 variant 132 # step 2: determine the Python 3 variant
129 found = False 133 found = False
130 if Utilities.isMacPlatform(): 134 if Utilities.isMacPlatform():
131 checkStr = "Python.framework/Versions/3".lower() 135 checkStr = "Python.framework/Versions/3".lower()

eric ide

mercurial