flet-cli 0.80.6.dev7609__tar.gz → 0.80.6.dev7615__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/PKG-INFO +1 -1
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/pyproject.toml +1 -1
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/build.py +14 -3
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/build_base.py +77 -2
- flet_cli-0.80.6.dev7615/src/flet_cli/version.py +1 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli.egg-info/PKG-INFO +1 -1
- flet_cli-0.80.6.dev7609/src/flet_cli/version.py +0 -1
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/README.md +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/setup.cfg +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/__pyinstaller/__init__.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/__pyinstaller/config.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/__pyinstaller/hook-flet.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/__pyinstaller/macos_utils.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/__pyinstaller/rthooks/pyi_rth_localhost_fletd.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/__pyinstaller/utils.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/__pyinstaller/win_utils.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/cli.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/base.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/create.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/debug.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/devices.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/doctor.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/emulators.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/flutter_base.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/options.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/pack.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/publish.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/run.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/commands/serve.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/utils/android_sdk.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/utils/distros.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/utils/flutter.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/utils/hash_stamp.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/utils/jdk.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/utils/merge.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/utils/processes.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/utils/project_dependencies.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/utils/pyproject_toml.py +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli.egg-info/SOURCES.txt +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli.egg-info/dependency_links.txt +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli.egg-info/entry_points.txt +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli.egg-info/requires.txt +0 -0
- {flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli.egg-info/top_level.txt +0 -0
|
@@ -10,8 +10,8 @@ class Command(BaseBuildCommand):
|
|
|
10
10
|
"""
|
|
11
11
|
Build a Flet Python app into a platform-specific executable or
|
|
12
12
|
installable bundle. It supports building for desktop (macOS, Linux, Windows), web,
|
|
13
|
-
Android (APK/AAB), and iOS (IPA), with a wide range of
|
|
14
|
-
metadata, assets, splash screens, and signing.
|
|
13
|
+
Android (APK/AAB), and iOS (IPA and simulator .app), with a wide range of
|
|
14
|
+
customization options for metadata, assets, splash screens, and signing.
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
def __init__(self, parser: argparse.ArgumentParser) -> None:
|
|
@@ -28,7 +28,16 @@ class Command(BaseBuildCommand):
|
|
|
28
28
|
parser.add_argument(
|
|
29
29
|
"target_platform",
|
|
30
30
|
type=str.lower,
|
|
31
|
-
choices=[
|
|
31
|
+
choices=[
|
|
32
|
+
"macos",
|
|
33
|
+
"linux",
|
|
34
|
+
"windows",
|
|
35
|
+
"web",
|
|
36
|
+
"apk",
|
|
37
|
+
"aab",
|
|
38
|
+
"ipa",
|
|
39
|
+
"ios-simulator",
|
|
40
|
+
],
|
|
32
41
|
help="The target platform or type of package to build",
|
|
33
42
|
)
|
|
34
43
|
parser.add_argument(
|
|
@@ -118,6 +127,8 @@ class Command(BaseBuildCommand):
|
|
|
118
127
|
)
|
|
119
128
|
else:
|
|
120
129
|
args.append("--no-codesign")
|
|
130
|
+
elif self.target_platform == "ios-simulator":
|
|
131
|
+
args.append("--simulator")
|
|
121
132
|
|
|
122
133
|
build_number = self.options.build_number or self.get_pyproject(
|
|
123
134
|
"tool.flet.build_number"
|
|
@@ -125,6 +125,15 @@ class BaseBuildCommand(BaseFlutterCommand):
|
|
|
125
125
|
"dist": "ipa",
|
|
126
126
|
"can_be_run_on": ["Darwin"],
|
|
127
127
|
},
|
|
128
|
+
"ios-simulator": {
|
|
129
|
+
"package_platform": "iOS",
|
|
130
|
+
"config_platform": "ios",
|
|
131
|
+
"flutter_build_command": "ios",
|
|
132
|
+
"status_text": ".app bundle for iOS Simulator",
|
|
133
|
+
"outputs": ["build/ios/iphonesimulator/*"],
|
|
134
|
+
"dist": "ios-simulator",
|
|
135
|
+
"can_be_run_on": ["Darwin"],
|
|
136
|
+
},
|
|
128
137
|
}
|
|
129
138
|
|
|
130
139
|
self.cross_platform_permissions = {
|
|
@@ -486,7 +495,7 @@ class BaseBuildCommand(BaseFlutterCommand):
|
|
|
486
495
|
nargs="+",
|
|
487
496
|
default=[],
|
|
488
497
|
help="The list of `<key>=<value>|True|False` pairs to add to Info.plist "
|
|
489
|
-
"for macOS and iOS builds (macos and
|
|
498
|
+
"for macOS and iOS builds (macos, ipa and ios-simulator only)",
|
|
490
499
|
)
|
|
491
500
|
parser.add_argument(
|
|
492
501
|
"--macos-entitlements",
|
|
@@ -1370,7 +1379,7 @@ class BaseBuildCommand(BaseFlutterCommand):
|
|
|
1370
1379
|
assert self.build_dir
|
|
1371
1380
|
assert self.target_platform
|
|
1372
1381
|
|
|
1373
|
-
if self.target_platform not in ["web", "ipa", "apk", "aab"]:
|
|
1382
|
+
if self.target_platform not in ["web", "ipa", "ios-simulator", "apk", "aab"]:
|
|
1374
1383
|
return
|
|
1375
1384
|
|
|
1376
1385
|
hash = HashStamp(self.build_dir / ".hash" / "splashes")
|
|
@@ -2069,12 +2078,78 @@ class BaseBuildCommand(BaseFlutterCommand):
|
|
|
2069
2078
|
if self.target_platform == "web" and self.assets_path.exists():
|
|
2070
2079
|
# copy `assets` directory contents to the output directory
|
|
2071
2080
|
copy_tree(str(self.assets_path), str(self.out_dir))
|
|
2081
|
+
elif self.target_platform in {"apk", "aab"}:
|
|
2082
|
+
self.rename_android_build_outputs()
|
|
2072
2083
|
|
|
2073
2084
|
console.log(
|
|
2074
2085
|
f"Copied build to [cyan]{self.rel_out_dir}[/cyan] "
|
|
2075
2086
|
f"directory {self.emojis['checkmark']}"
|
|
2076
2087
|
)
|
|
2077
2088
|
|
|
2089
|
+
def rename_android_build_outputs(self):
|
|
2090
|
+
"""
|
|
2091
|
+
Rename copied Android release artifacts so they honor user-configured
|
|
2092
|
+
artifact names.
|
|
2093
|
+
|
|
2094
|
+
Flutter outputs APK/AAB release files with an `app` prefix
|
|
2095
|
+
(`app-release.*`, `app-<abi>-release.*`), plus optional `.sha1` files.
|
|
2096
|
+
This method removes the `-release` segment and replaces only the
|
|
2097
|
+
leading `app` token with the resolved Flet artifact name.
|
|
2098
|
+
"""
|
|
2099
|
+
assert self.target_platform
|
|
2100
|
+
assert self.out_dir
|
|
2101
|
+
assert self.template_data
|
|
2102
|
+
|
|
2103
|
+
artifact_name = str(self.template_data["artifact_name"])
|
|
2104
|
+
output_ext = "apk" if self.target_platform == "apk" else "aab"
|
|
2105
|
+
release_suffix = f"-release.{output_ext}"
|
|
2106
|
+
release_hash_suffix = f"{release_suffix}.sha1"
|
|
2107
|
+
final_suffix = f".{output_ext}"
|
|
2108
|
+
final_hash_suffix = f"{final_suffix}.sha1"
|
|
2109
|
+
|
|
2110
|
+
for output_file in self.out_dir.iterdir():
|
|
2111
|
+
if not output_file.is_file():
|
|
2112
|
+
continue
|
|
2113
|
+
|
|
2114
|
+
name = output_file.name
|
|
2115
|
+
suffix = None
|
|
2116
|
+
final_file_suffix = None
|
|
2117
|
+
if name.endswith(release_hash_suffix):
|
|
2118
|
+
suffix = release_hash_suffix
|
|
2119
|
+
final_file_suffix = final_hash_suffix
|
|
2120
|
+
elif name.endswith(release_suffix):
|
|
2121
|
+
suffix = release_suffix
|
|
2122
|
+
final_file_suffix = final_suffix
|
|
2123
|
+
if suffix is None or final_file_suffix is None:
|
|
2124
|
+
continue
|
|
2125
|
+
|
|
2126
|
+
prefix = name[: -len(suffix)]
|
|
2127
|
+
# Only rewrite Flutter default release outputs that start with `app`.
|
|
2128
|
+
if prefix != "app" and not prefix.startswith("app-"):
|
|
2129
|
+
continue
|
|
2130
|
+
|
|
2131
|
+
# Keep ABI and hash suffixes, but drop `-release`.
|
|
2132
|
+
renamed = f"{artifact_name}{prefix[len('app') :]}{final_file_suffix}"
|
|
2133
|
+
if renamed == name:
|
|
2134
|
+
continue
|
|
2135
|
+
|
|
2136
|
+
renamed_path = output_file.with_name(renamed)
|
|
2137
|
+
if renamed_path.exists():
|
|
2138
|
+
console.log(
|
|
2139
|
+
f"Skipping rename of [cyan]{name}[/cyan] because "
|
|
2140
|
+
f"[cyan]{renamed}[/cyan] already exists.",
|
|
2141
|
+
style=warning_style,
|
|
2142
|
+
)
|
|
2143
|
+
continue
|
|
2144
|
+
|
|
2145
|
+
output_file.rename(renamed_path)
|
|
2146
|
+
if self.verbose > 0:
|
|
2147
|
+
console.log(
|
|
2148
|
+
f"Renamed build output from [cyan]{name}[/cyan] to "
|
|
2149
|
+
f"[cyan]{renamed}[/cyan].",
|
|
2150
|
+
style=verbose1_style,
|
|
2151
|
+
)
|
|
2152
|
+
|
|
2078
2153
|
def find_platform_image(
|
|
2079
2154
|
self,
|
|
2080
2155
|
src_path: Path,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
version = "0.80.6.dev7615"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
version = "0.80.6.dev7609"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/__pyinstaller/macos_utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli/utils/project_dependencies.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{flet_cli-0.80.6.dev7609 → flet_cli-0.80.6.dev7615}/src/flet_cli.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|