Tue, 18 Oct 2022 16:06:21 +0200
Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
2087
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | # -*- coding: utf-8 -*- |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | |
8881
54e42bc2437a
Updated copyright for 2022.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
8312
diff
changeset
|
3 | # Copyright (c) 2012 - 2022 Detlev Offenbach <detlev@die-offenbachs.de> |
2087
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
4 | # |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
5 | |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | """ |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | Module implementing a function to generate an application info. |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | """ |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | |
9413
80c06d472826
Changed the eric7 import statements to include the package name (i.e. eric7) in order to not fiddle with sys.path.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9221
diff
changeset
|
10 | from eric7.UI.Info import Version |
2087
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
11 | |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
12 | |
5651
982465f8389c
Fixed a few code style issues related to the usage of mutable types for default arguments.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
5389
diff
changeset
|
13 | def makeAppInfo(argv, name, arg, description, options=None): |
2087
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
14 | """ |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
15 | Module function to generate a dictionary describing the application. |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
16 | |
2087
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
17 | @param argv list of commandline parameters (list of strings) |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
18 | @param name name of the application (string) |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
19 | @param arg commandline arguments (string) |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
20 | @param description text describing the application (string) |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
21 | @param options list of additional commandline options |
2991
226481ff40d1
Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
2302
diff
changeset
|
22 | (list of tuples of two strings (commandline option, |
226481ff40d1
Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
2302
diff
changeset
|
23 | option description)). The options --version, --help and -h are |
226481ff40d1
Continued to shorten the code lines to max. 79 characters.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
2302
diff
changeset
|
24 | always present and must not be repeated in this list. |
2087
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
25 | @return dictionary describing the application |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
26 | """ |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
27 | return { |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
28 | "bin": argv[0], |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
29 | "arg": arg, |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
30 | "name": name, |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
31 | "description": description, |
795992a5c561
Made the sixth set of Qt5 compatibility changes.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
32 | "version": Version, |
9221
bf71ee032bb4
Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
9209
diff
changeset
|
33 | "options": [] if options is None else options[:], |
3035
36e9f388958b
Fixed a bunch of indentation issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
2991
diff
changeset
|
34 | } |