Debian Codegraph @

src/briefcase/bootstraps/console.py

raw
1 from __future__ import annotations
2
3 from typing import Any
4
5 from briefcase.bootstraps.base import BaseGuiBootstrap
6
7
8 class ConsoleBootstrap(BaseGuiBootstrap):
9 display_name_annotation = "does not support iOS/Android/Web deployment"
10
11 def extra_context(self, project_overrides: dict[str, str]) -> dict[str, Any] | None:
12 return {
13 "console_app": True,
14 }
15
16 def app_source(self):
17 return """\
18
19 def main():
20 # Your app logic goes here
21 print("Hello, World.")
22 """
23
24 def app_start_source(self):
25 return """\
26 from {{ cookiecutter.module_name }}.app import main
27
28 if __name__ == "__main__":
29 main()
30 """
31
32 def pyproject_table_briefcase_app_extra_content(self):
33 return """
34 requires = [
35 # Add your cross-platform app requirements here
36 ]
37 test_requires = [
38 {% if cookiecutter.test_framework == "pytest" %}
39 "pytest",
40 {% endif %}
41 ]
42 """
43
44 def pyproject_table_macOS(self):
45 return """\
46 universal_build = true
47 requires = [
48 # Add your macOS-specific app requirements here
49 ]
50 """
51
52 def pyproject_table_linux(self):
53 return """\
54 requires = [
55 # Add your Linux-specific app requirements here
56 ]
57 """
58
59 def pyproject_table_linux_system_debian(self):
60 return """\
61 system_requires = [
62 # Add any system packages needed at build the app here
63 ]
64
65 system_runtime_requires = [
66 # Add any system packages needed at runtime here
67 ]
68 """
69
70 def pyproject_table_linux_system_rhel(self):
71 return """\
72 system_requires = [
73 # Add any system packages needed at build the app here
74 ]
75
76 system_runtime_requires = [
77 # Add any system packages needed at runtime here
78 ]
79 """
80
81 def pyproject_table_linux_system_suse(self):
82 return """\
83 system_requires = [
84 # Add any system packages needed at build the app here
85 ]
86
87 system_runtime_requires = [
88 # Add any system packages needed at runtime here
89 ]
90 """
91
92 def pyproject_table_linux_system_arch(self):
93 return """\
94 system_requires = [
95 # Add any system packages needed at build the app here
96 ]
97
98 system_runtime_requires = [
99 # Add any system packages needed at runtime here
100 ]
101 """
102
103 def pyproject_table_linux_flatpak(self):
104 return """\
105 flatpak_runtime = "org.freedesktop.Platform"
106 flatpak_runtime_version = "25.08"
107 flatpak_sdk = "org.freedesktop.Sdk"
108 """
109
110 def pyproject_table_windows(self):
111 return """\
112 requires = [
113 # Add your Windows-specific app requirements here
114 ]
115 """
116
117 def pyproject_table_iOS(self):
118 return """\
119 supported = false
120 """
121
122 def pyproject_table_android(self):
123 return """\
124 supported = false
125 """
126
127 def pyproject_table_web(self):
128 return """\
129 supported = false
130 """