7 |
7 |
8 """ |
8 """ |
9 Installation script for the eric IDE dependencies. |
9 Installation script for the eric IDE dependencies. |
10 """ |
10 """ |
11 |
11 |
|
12 import contextlib |
12 import subprocess |
13 import subprocess |
13 import sys |
14 import sys |
|
15 |
|
16 |
|
17 def exit(rcode=0): |
|
18 """ |
|
19 Exit the install script. |
|
20 |
|
21 @param rcode result code to report back (integer) |
|
22 """ |
|
23 print() |
|
24 |
|
25 if sys.platform.startswith(("win", "cygwin")): |
|
26 with contextlib.suppress(): |
|
27 input("Press enter to continue...") # secok |
|
28 |
|
29 sys.exit(rcode) |
14 |
30 |
15 |
31 |
16 def pipInstall(packageName): |
32 def pipInstall(packageName): |
17 """ |
33 """ |
18 Install the given package via pip. |
34 Install the given package via pip. |
41 |
57 |
42 def main(): |
58 def main(): |
43 """ |
59 """ |
44 Function to install the eric dependencies. |
60 Function to install the eric dependencies. |
45 """ |
61 """ |
46 packages = ( |
62 requiredPackages = ( |
47 "wheel", |
|
48 "PyQt6>=6.2.0", |
63 "PyQt6>=6.2.0", |
49 "PyQt6-Charts>=6.2.0", |
64 "PyQt6-Charts>=6.2.0", |
50 "PyQt6-WebEngine>=6.2.0", |
65 "PyQt6-WebEngine>=6.2.0", |
51 "PyQt6-QScintilla>=2.13.0", |
66 "PyQt6-QScintilla>=2.13.0", |
52 "docutils", |
|
53 "Markdown", |
|
54 "pyyaml", |
|
55 "tomlkit", |
67 "tomlkit", |
56 "chardet", |
|
57 "asttokens", |
68 "asttokens", |
58 "EditorConfig", |
69 "EditorConfig", |
59 "Send2Trash", |
|
60 "Pygments", |
70 "Pygments", |
61 "parso", |
71 "parso", |
62 "jedi", |
72 "jedi", |
63 "packaging", |
73 "packaging", |
64 "pipdeptree", |
|
65 "cyclonedx-python-lib", |
74 "cyclonedx-python-lib", |
66 "cyclonedx-bom", |
75 "cyclonedx-bom", |
67 "trove-classifiers", |
76 "trove-classifiers", |
|
77 "black>=22.6.0", |
68 ) |
78 ) |
|
79 optionalPackages = ( |
|
80 "docutils", |
|
81 "Markdown", |
|
82 "pyyaml", |
|
83 "chardet", |
|
84 "Send2Trash", |
|
85 "pyenchant", |
|
86 "wheel", |
|
87 ) |
|
88 |
|
89 packages = [] |
|
90 if len(sys.argv) == 2: |
|
91 if sys.argv[1] == "--all": |
|
92 packages = requiredPackages + optionalPackages |
|
93 elif sys.argv[1] == "--required": |
|
94 packages = requiredPackages |
|
95 elif sys.argv[1] == "--optional": |
|
96 packages = optionalPackages |
|
97 |
|
98 if not packages: |
|
99 print("Usage:") |
|
100 print(" install-dependencies --all | --optional | --required") |
|
101 print("where:") |
|
102 print(" --all install all dependencies") |
|
103 print(" --optional install all optional dependencies") |
|
104 print(" --required install all required dependencies") |
|
105 |
|
106 exit(42) |
69 |
107 |
70 failedPackages = [] |
108 failedPackages = [] |
71 for package in packages: |
109 for package in packages: |
72 ok = pipInstall(package) |
110 ok = pipInstall(package) |
73 if not ok: |
111 if not ok: |