-
-
Notifications
You must be signed in to change notification settings - Fork 349
/
base.py
137 lines (105 loc) · 4.87 KB
/
base.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
from __future__ import annotations
from abc import ABC
from typing import Literal
class BaseGuiPlugin(ABC):
name: str
fields: list[str] = [
"app_source",
"start_app_source",
"requires",
"macos_requires",
"macos_universal_build",
"linux_requires",
"linux_system_debian_system_requires",
"linux_system_debian_system_runtime_requires",
"linux_system_rhel_system_requires",
"linux_system_rhel_system_runtime_requires",
"linux_system_suse_system_requires",
"linux_system_suse_system_runtime_requires",
"linux_system_arch_system_requires",
"linux_system_arch_system_runtime_requires",
"linux_appimage_manylinux",
"linux_appimage_system_requires",
"linux_appimage_linuxdeploy_plugins",
"linux_flatpak_runtime",
"linux_flatpak_runtime_version",
"linux_flatpak_sdk",
"windows_requires",
"ios_requires",
"ios_supported",
"android_requires",
"android_supported",
"web_requires",
"web_supported",
"web_style_framework",
]
def __init__(self, context: dict[str, str | int | bool]):
# context contains metadata about the app:
# formal_name
# app_name
# class_name
# module_name
# project_name
# description
# author
# author_email
# bundle
# url
# license
self.context = context
def app_source(self) -> str | None:
"""The Python source code for the project."""
def start_app_source(self) -> str | None:
"""The Python source code to start the app from __main__.py."""
def requires(self) -> str | None:
"""List of package requirements for all platforms."""
def macos_requires(self) -> str | None:
"""List of package requirements for macOS."""
def macos_universal_build(self) -> Literal["true", "false"] | None:
"""Whether to create a universal build for macOS."""
def linux_requires(self) -> str | None:
"""List of package requirements for Linux."""
def linux_system_debian_system_requires(self) -> str | None:
"""List of system package requirements to build the app."""
def linux_system_debian_system_runtime_requires(self) -> str | None:
"""List of system package requirements to run the app on Debian."""
def linux_system_rhel_system_requires(self) -> str | None:
"""List of system package requirements to build the app on RHEL."""
def linux_system_rhel_system_runtime_requires(self) -> str | None:
"""List of system package requirements to run the app on RHEL."""
def linux_system_suse_system_requires(self) -> str | None:
"""List of system package requirements to build the app on SUSE."""
def linux_system_suse_system_runtime_requires(self) -> str | None:
"""List of system package requirements to run the app on SUSE."""
def linux_system_arch_system_requires(self) -> str | None:
"""List of system package requirements to build the app on Arch."""
def linux_system_arch_system_runtime_requires(self) -> str | None:
"""List of system package requirements to run the app on Arch."""
def linux_appimage_manylinux(self) -> str | None:
"""The manylinux base, e.g. manylinux2014, to use to build the app."""
def linux_appimage_system_requires(self) -> str | None:
"""List of system package requirements to build the app in to an AppImage."""
def linux_appimage_linuxdeploy_plugins(self) -> str | None:
"""List of linuxdeploy plugins to use to build the app in to an AppImage."""
def linux_flatpak_runtime(self) -> str | None:
"""The Flatpak runtime, e.g. org.gnome.Platform, for the app."""
def linux_flatpak_runtime_version(self) -> str | None:
"""The Flatpak runtime version, e.g. 44, for the app."""
def linux_flatpak_sdk(self) -> str | None:
"""The Flatpak SDK, e.g. org.gnome.Sdk, for the app."""
def windows_requires(self) -> str | None:
"""List of package requirements for Windows."""
def ios_requires(self) -> str | None:
"""List of package requirements for iOS."""
def ios_supported(self) -> Literal["true", "false"] | None:
"""Whether the GUI framework supports iOS."""
def android_requires(self) -> str | None:
"""List of package requirements for Android."""
def android_supported(self) -> Literal["true", "false"] | None:
"""Whether the GUI framework supports Android."""
def web_requires(self) -> str | None:
"""List of package requirements for Web."""
def web_supported(self) -> Literal["true", "false"] | None:
"""Whether the GUI framework supports Web."""
def web_style_framework(self) -> str | None:
"""The style framework, e.g. Bootstrap or Shoelace, for web."""