38 doCleanup = True |
38 doCleanup = True |
39 doCleanDesktopLinks = False |
39 doCleanDesktopLinks = False |
40 forceCleanDesktopLinks = False |
40 forceCleanDesktopLinks = False |
41 doCompile = True |
41 doCompile = True |
42 yes2All = False |
42 yes2All = False |
|
43 ignorePyqt5Tools = False |
43 cfg = {} |
44 cfg = {} |
44 progLanguages = ["Python", "Ruby", "QSS"] |
45 progLanguages = ["Python", "Ruby", "QSS"] |
45 sourceDir = "eric" |
46 sourceDir = "eric" |
46 eric6SourceDir = os.path.join(sourceDir, "eric6") |
47 eric6SourceDir = os.path.join(sourceDir, "eric6") |
47 configName = 'eric6config.py' |
48 configName = 'eric6config.py' |
122 print(" {0} [-chxz] [-a dir] [-b dir] [-d dir] [-f file] [-i dir]" |
123 print(" {0} [-chxz] [-a dir] [-b dir] [-d dir] [-f file] [-i dir]" |
123 " [-m name] [-n path] [-p python] [--no-apis] [--yes]" |
124 " [-m name] [-n path] [-p python] [--no-apis] [--yes]" |
124 .format(progName)) |
125 .format(progName)) |
125 elif sys.platform.startswith(("win", "cygwin")): |
126 elif sys.platform.startswith(("win", "cygwin")): |
126 print(" {0} [-chxz] [-a dir] [-b dir] [-d dir] [-f file]" |
127 print(" {0} [-chxz] [-a dir] [-b dir] [-d dir] [-f file]" |
127 " [--clean-desktop] [--no-apis] [--yes]" |
128 " [--clean-desktop] [--no-apis] [--no-tools] [--yes]" |
128 .format(progName)) |
129 .format(progName)) |
129 else: |
130 else: |
130 print(" {0} [-chxz] [-a dir] [-b dir] [-d dir] [-f file] [-i dir]" |
131 print(" {0} [-chxz] [-a dir] [-b dir] [-d dir] [-f file] [-i dir]" |
131 " [--no-apis] [--yes]" |
132 " [--no-apis] [--no-tools] [--yes]" |
132 .format(progName)) |
133 .format(progName)) |
133 print("where:") |
134 print("where:") |
134 print(" -h, --help display this help message") |
135 print(" -h, --help display this help message") |
135 print(" -a dir where the API files will be installed") |
136 print(" -a dir where the API files will be installed") |
136 if apisDir: |
137 if apisDir: |
155 print(" (default: {0})".format(macAppBundlePath)) |
156 print(" (default: {0})".format(macAppBundlePath)) |
156 print(" -p python path of the python executable") |
157 print(" -p python path of the python executable") |
157 print(" (default: {0})".format(macPythonExe)) |
158 print(" (default: {0})".format(macPythonExe)) |
158 print(" -c don't cleanup old installation first") |
159 print(" -c don't cleanup old installation first") |
159 if sys.platform.startswith(("win", "cygwin")): |
160 if sys.platform.startswith(("win", "cygwin")): |
160 (" --clean-desktop delete desktop links before installation") |
161 print(" --clean-desktop delete desktop links before installation") |
|
162 if sys.platform != "darwin": |
|
163 print(" --no-tools don't ask for installation of pyqt5-tools") |
161 print(" -x don't perform dependency checks (use on your own" |
164 print(" -x don't perform dependency checks (use on your own" |
162 " risk)") |
165 " risk)") |
163 print(" -z don't compile the installed python files") |
166 print(" -z don't compile the installed python files") |
164 print(" --yes answer 'yes' to all questions") |
167 print(" --yes answer 'yes' to all questions") |
165 print() |
168 print() |
1525 # Tuple with alternatives, flag indicating it's ok to not be |
1528 # Tuple with alternatives, flag indicating it's ok to not be |
1526 # available (e.g. for 32-Bit Windows) |
1529 # available (e.g. for 32-Bit Windows) |
1527 (("PyQt5.QtWebEngineWidgets", ), sys.maxsize <= 2**32), |
1530 (("PyQt5.QtWebEngineWidgets", ), sys.maxsize <= 2**32), |
1528 ] |
1531 ] |
1529 optionalModulesList = {} |
1532 optionalModulesList = {} |
1530 if sys.platform != "darwin": |
1533 if sys.platform != "darwin" and not ignorePyqt5Tools: |
1531 optionalModulesList["pyqt5-tools"] = "pyqt5_tools" |
1534 optionalModulesList["pyqt5-tools"] = "pyqt5_tools" |
1532 |
1535 |
1533 # check mandatory modules |
1536 # check mandatory modules |
1534 modulesOK = True |
1537 modulesOK = True |
1535 for impModule in impModulesList: |
1538 for impModule in impModulesList: |
1865 # Parse the command line. |
1868 # Parse the command line. |
1866 global progName, modDir, doCleanup, doCompile, distDir, cfg, apisDir |
1869 global progName, modDir, doCleanup, doCompile, distDir, cfg, apisDir |
1867 global sourceDir, eric6SourceDir, configName |
1870 global sourceDir, eric6SourceDir, configName |
1868 global macAppBundlePath, macAppBundleName, macPythonExe |
1871 global macAppBundlePath, macAppBundleName, macPythonExe |
1869 global installApis, doCleanDesktopLinks, yes2All, installCwd |
1872 global installApis, doCleanDesktopLinks, yes2All, installCwd |
|
1873 global ignorePyqt5Tools |
1870 |
1874 |
1871 if sys.version_info < (3, 5, 0) or sys.version_info > (3, 99, 99): |
1875 if sys.version_info < (3, 5, 0) or sys.version_info > (3, 99, 99): |
1872 print('Sorry, eric6 requires at least Python 3.5 for running.') |
1876 print('Sorry, eric6 requires at least Python 3.5 for running.') |
1873 exit(5) |
1877 exit(5) |
1874 |
1878 |
1883 |
1887 |
1884 try: |
1888 try: |
1885 if sys.platform.startswith(("win", "cygwin")): |
1889 if sys.platform.startswith(("win", "cygwin")): |
1886 optlist, args = getopt.getopt( |
1890 optlist, args = getopt.getopt( |
1887 argv[1:], "chxza:b:d:f:", |
1891 argv[1:], "chxza:b:d:f:", |
1888 ["help", "no-apis", "yes"]) |
1892 ["help", "no-apis", "no-tools", "yes"]) |
1889 elif sys.platform == "darwin": |
1893 elif sys.platform == "darwin": |
1890 optlist, args = getopt.getopt( |
1894 optlist, args = getopt.getopt( |
1891 argv[1:], "chxza:b:d:f:i:m:n:p:", |
1895 argv[1:], "chxza:b:d:f:i:m:n:p:", |
1892 ["help", "no-apis", "yes"]) |
1896 ["help", "no-apis", "yes"]) |
1893 else: |
1897 else: |
1894 optlist, args = getopt.getopt( |
1898 optlist, args = getopt.getopt( |
1895 argv[1:], "chxza:b:d:f:i:", |
1899 argv[1:], "chxza:b:d:f:i:", |
1896 ["help", "no-apis", "yes"]) |
1900 ["help", "no-apis", "no-tools", "yes"]) |
1897 except getopt.GetoptError as err: |
1901 except getopt.GetoptError as err: |
1898 print(err) |
1902 print(err) |
1899 usage() |
1903 usage() |
1900 |
1904 |
1901 global platBinDir |
1905 global platBinDir |
1939 installApis = False |
1943 installApis = False |
1940 elif opt == "--clean-desktop": |
1944 elif opt == "--clean-desktop": |
1941 doCleanDesktopLinks = True |
1945 doCleanDesktopLinks = True |
1942 elif opt == "--yes": |
1946 elif opt == "--yes": |
1943 yes2All = True |
1947 yes2All = True |
|
1948 elif opt == "--no-tools": |
|
1949 ignorePyqt5Tools = True |
1944 |
1950 |
1945 infoName = "" |
1951 infoName = "" |
1946 installFromSource = not os.path.isdir(sourceDir) |
1952 installFromSource = not os.path.isdir(sourceDir) |
1947 |
1953 |
1948 # check dependencies |
1954 # check dependencies |