scripts/install.py

changeset 8214
51f0d3e047ec
parent 8205
4a0f1f896341
child 8240
93b8a353c4bf
equal deleted inserted replaced
8213:4cdfe4fbdd26 8214:51f0d3e047ec
234 try: 234 try:
235 from PyQt5.QtCore import QLibraryInfo 235 from PyQt5.QtCore import QLibraryInfo
236 qtDataDir = QLibraryInfo.location(QLibraryInfo.DataPath) 236 qtDataDir = QLibraryInfo.location(QLibraryInfo.DataPath)
237 except ImportError: 237 except ImportError:
238 qtDataDir = None 238 qtDataDir = None
239 if qtDataDir: 239 apisDir = os.path.join(qtDataDir, "qsci", "api") if qtDataDir else None
240 apisDir = os.path.join(qtDataDir, "qsci", "api")
241 else:
242 apisDir = None
243 240
244 241
245 def copyToFile(name, text): 242 def copyToFile(name, text):
246 """ 243 """
247 Copy a string to a file. 244 Copy a string to a file.
1937 elif opt == "-c": 1934 elif opt == "-c":
1938 doCleanup = False 1935 doCleanup = False
1939 elif opt == "-z": 1936 elif opt == "-z":
1940 doCompile = False 1937 doCompile = False
1941 elif opt == "-f": 1938 elif opt == "-f":
1942 try: 1939 with open(arg) as f:
1943 exec(compile(open(arg).read(), arg, 'exec'), globals()) 1940 try:
1944 # secok 1941 exec(compile(f.read(), arg, 'exec'), globals())
1945 if len(cfg) != configLength: 1942 # secok
1946 print("The configuration dictionary in '{0}' is incorrect." 1943 if len(cfg) != configLength:
1947 " Aborting".format(arg)) 1944 print("The configuration dictionary in '{0}' is"
1948 exit(6) 1945 " incorrect. Aborting".format(arg))
1949 except Exception: 1946 exit(6)
1950 cfg = {} 1947 except Exception:
1948 cfg = {}
1951 elif opt == "-m": 1949 elif opt == "-m":
1952 macAppBundleName = arg 1950 macAppBundleName = arg
1953 elif opt == "-n": 1951 elif opt == "-n":
1954 macAppBundlePath = arg 1952 macAppBundlePath = arg
1955 elif opt == "-p": 1953 elif opt == "-p":

eric ide

mercurial