flet-cli 0.83.1__tar.gz → 0.84.0.dev0__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.
Files changed (46) hide show
  1. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/PKG-INFO +3 -3
  2. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/README.md +1 -1
  3. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/pyproject.toml +2 -2
  4. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/__pyinstaller/utils.py +12 -11
  5. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/build.py +1 -1
  6. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/emulators.py +1 -1
  7. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/pack.py +47 -18
  8. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/run.py +2 -2
  9. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/serve.py +1 -1
  10. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/utils/processes.py +3 -3
  11. flet_cli-0.84.0.dev0/src/flet_cli/version.py +1 -0
  12. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli.egg-info/PKG-INFO +3 -3
  13. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli.egg-info/requires.txt +1 -1
  14. flet_cli-0.83.1/src/flet_cli/version.py +0 -1
  15. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/setup.cfg +0 -0
  16. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/__pyinstaller/__init__.py +0 -0
  17. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/__pyinstaller/config.py +0 -0
  18. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/__pyinstaller/hook-flet.py +0 -0
  19. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/__pyinstaller/macos_utils.py +0 -0
  20. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/__pyinstaller/rthooks/pyi_rth_localhost_fletd.py +0 -0
  21. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/__pyinstaller/win_utils.py +0 -0
  22. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/cli.py +0 -0
  23. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/base.py +0 -0
  24. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/build_base.py +0 -0
  25. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/create.py +0 -0
  26. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/debug.py +0 -0
  27. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/devices.py +0 -0
  28. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/doctor.py +0 -0
  29. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/flutter_base.py +0 -0
  30. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/options.py +0 -0
  31. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/commands/publish.py +0 -0
  32. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/utils/android_sdk.py +0 -0
  33. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/utils/cli.py +0 -0
  34. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/utils/distros.py +0 -0
  35. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/utils/flutter.py +0 -0
  36. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/utils/hash_stamp.py +0 -0
  37. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/utils/jdk.py +0 -0
  38. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/utils/merge.py +0 -0
  39. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/utils/plist.py +0 -0
  40. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/utils/project_dependencies.py +0 -0
  41. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli/utils/pyproject_toml.py +0 -0
  42. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli.egg-info/SOURCES.txt +0 -0
  43. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli.egg-info/dependency_links.txt +0 -0
  44. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli.egg-info/entry_points.txt +0 -0
  45. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/src/flet_cli.egg-info/top_level.txt +0 -0
  46. {flet_cli-0.83.1 → flet_cli-0.84.0.dev0}/tests/test_plist.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-cli
3
- Version: 0.83.1
3
+ Version: 0.84.0.dev0
4
4
  Summary: Flet CLI
5
5
  Author-email: "Appveyor Systems Inc." <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
@@ -9,7 +9,7 @@ Project-URL: Repository, https://github.com/flet-dev/flet
9
9
  Project-URL: Documentation, https://flet.dev/docs
10
10
  Requires-Python: >=3.10
11
11
  Description-Content-Type: text/markdown
12
- Requires-Dist: flet==0.83.1
12
+ Requires-Dist: flet==0.84.0.dev0
13
13
  Requires-Dist: watchdog>=4.0.0
14
14
  Requires-Dist: packaging>=25.0
15
15
  Requires-Dist: qrcode>=7.4.2
@@ -21,7 +21,7 @@ Requires-Dist: chardet<6
21
21
  # Flet CLI
22
22
 
23
23
  [![python](https://img.shields.io/badge/python-%3E%3D3.10-%2334D058)](https://pypi.org/project/flet-cli)
24
- [![docstring coverage](https://docs.flet.dev/assets/badges/docs-coverage/flet-cli.svg)](https://docs.flet.dev/assets/badges/docs-coverage/flet-cli.svg)
24
+ [![docstring coverage](https://flet.dev/docs/assets/badges/docs-coverage/flet-cli.svg)](https://flet.dev/docs/assets/badges/docs-coverage/flet-cli.svg)
25
25
 
26
26
  Flet CLI is a command-line interface tool for Flet, a framework for building interactive multi-platform applications using Python.
27
27
 
@@ -1,7 +1,7 @@
1
1
  # Flet CLI
2
2
 
3
3
  [![python](https://img.shields.io/badge/python-%3E%3D3.10-%2334D058)](https://pypi.org/project/flet-cli)
4
- [![docstring coverage](https://docs.flet.dev/assets/badges/docs-coverage/flet-cli.svg)](https://docs.flet.dev/assets/badges/docs-coverage/flet-cli.svg)
4
+ [![docstring coverage](https://flet.dev/docs/assets/badges/docs-coverage/flet-cli.svg)](https://flet.dev/docs/assets/badges/docs-coverage/flet-cli.svg)
5
5
 
6
6
  Flet CLI is a command-line interface tool for Flet, a framework for building interactive multi-platform applications using Python.
7
7
 
@@ -1,13 +1,13 @@
1
1
  [project]
2
2
  name = "flet-cli"
3
- version = "0.83.1"
3
+ version = "0.84.0.dev0"
4
4
  description = "Flet CLI"
5
5
  authors = [{ name = "Appveyor Systems Inc.", email = "hello@flet.dev" }]
6
6
  license = "Apache-2.0"
7
7
  readme = "README.md"
8
8
  requires-python = ">=3.10"
9
9
  dependencies = [
10
- "flet==0.83.1",
10
+ "flet==0.84.0.dev0",
11
11
  "watchdog >=4.0.0",
12
12
  "packaging >=25.0",
13
13
  "qrcode >=7.4.2",
@@ -4,27 +4,28 @@ import uuid
4
4
  from pathlib import Path
5
5
 
6
6
  from flet.utils import copy_tree
7
- from flet_desktop import ensure_client_cached, get_package_bin_dir
7
+ from flet_desktop import ensure_client_cached
8
8
 
9
9
 
10
10
  def get_flet_bin_path():
11
11
  """
12
12
  Return path to Flet desktop binaries, if available.
13
13
 
14
- Checks the package ``app/`` directory first (for PyInstaller-bundled
15
- builds), then falls back to the download cache at ``~/.flet/client/``,
16
- triggering a download if necessary.
14
+ Resolution order:
15
+
16
+ 1. FLET_VIEW_PATH environment variable.
17
+ 2. Cached / downloaded client from ~/.flet/client/.
17
18
 
18
19
  Returns:
19
- Absolute binaries directory path or ``None`` when not found.
20
+ Absolute binaries directory path or `None` when not found.
20
21
  """
21
22
 
22
- # Check bundled binaries in the package (PyInstaller or legacy wheel).
23
- bin_path = get_package_bin_dir()
24
- if os.path.exists(bin_path) and os.listdir(bin_path):
25
- return bin_path
23
+ # 1. Check FLET_VIEW_PATH (developer / custom build mode).
24
+ flet_view_path = os.environ.get("FLET_VIEW_PATH")
25
+ if flet_view_path and os.path.exists(flet_view_path):
26
+ return flet_view_path
26
27
 
27
- # Fall back to cached / downloaded client.
28
+ # 2. Fall back to cached / downloaded client.
28
29
  cache_dir = ensure_client_cached()
29
30
  if cache_dir and cache_dir.exists():
30
31
  return str(cache_dir)
@@ -37,7 +38,7 @@ def copy_flet_bin():
37
38
  Copy packaged Flet desktop binaries into a temporary directory.
38
39
 
39
40
  Returns:
40
- Path to the temporary copied binaries directory, or ``None`` when source
41
+ Path to the temporary copied binaries directory, or `None` when source
41
42
  binaries are unavailable.
42
43
  """
43
44
 
@@ -13,7 +13,7 @@ class Command(BaseBuildCommand):
13
13
  Android (APK/AAB), and iOS (IPA and simulator .app), with a wide range of
14
14
  customization options for metadata, assets, splash screens, and signing.
15
15
 
16
- Detailed guide with usage examples: https://docs.flet.dev/publish
16
+ Detailed guide with usage examples: https://flet.dev/docs/publish
17
17
  """
18
18
 
19
19
  def __init__(self, parser: argparse.ArgumentParser) -> None:
@@ -238,7 +238,7 @@ class Command(BaseFlutterCommand):
238
238
  Delete the selected Android virtual device.
239
239
 
240
240
  Resolves SDK location, then delegates deletion to
241
- [`AndroidSDK`][flet_cli.utils.android_sdk.].
241
+ `AndroidSDK`.
242
242
  """
243
243
 
244
244
  assert self.emulator_target
@@ -302,30 +302,59 @@ class Command(BaseCommand):
302
302
  )
303
303
 
304
304
  tar_path = os.path.join(
305
- hook_config.temp_bin_dir, "flet-macos-amd64.tar.gz"
305
+ hook_config.temp_bin_dir, "flet-macos.tar.gz"
306
306
  )
307
+
308
+ # Find the .app bundle: either unpack from tar.gz or
309
+ # locate an already-extracted bundle (GitHub releases cache).
310
+ app_path = None
307
311
  if os.path.exists(tar_path):
308
- # unpack
309
312
  app_path = unpack_app_bundle(tar_path)
313
+ else:
314
+ for entry in os.listdir(hook_config.temp_bin_dir):
315
+ if entry.endswith(".app"):
316
+ app_path = os.path.join(hook_config.temp_bin_dir, entry)
317
+ break
310
318
 
311
- # icon
312
- if options.icon:
313
- icon_path = options.icon
314
- if not Path(icon_path).is_absolute():
315
- icon_path = str(Path(os.getcwd()).joinpath(icon_path))
316
- update_flet_view_icon(app_path, icon_path)
317
-
318
- # version info
319
- app_path = update_flet_view_version_info(
320
- app_path=app_path,
321
- bundle_id=options.bundle_id,
322
- product_name=options.product_name,
323
- product_version=options.product_version,
324
- copyright=options.copyright,
319
+ if not app_path:
320
+ print(
321
+ "Error: macOS app bundle not found in "
322
+ f"{hook_config.temp_bin_dir}. "
323
+ "Set FLET_VIEW_PATH to the directory "
324
+ "containing your Flet.app."
325
325
  )
326
+ sys.exit(1)
327
+
328
+ # icon
329
+ if options.icon:
330
+ icon_path = options.icon
331
+ if not Path(icon_path).is_absolute():
332
+ icon_path = str(Path(os.getcwd()).joinpath(icon_path))
333
+ update_flet_view_icon(app_path, icon_path)
334
+
335
+ # version info
336
+ app_path = update_flet_view_version_info(
337
+ app_path=app_path,
338
+ bundle_id=options.bundle_id,
339
+ product_name=options.product_name,
340
+ product_version=options.product_version,
341
+ copyright=options.copyright,
342
+ )
343
+
344
+ # assemble
345
+ assemble_app_bundle(app_path, tar_path)
326
346
 
327
- # assemble
328
- assemble_app_bundle(app_path, tar_path)
347
+ # Remove everything except the tar.gz so
348
+ # PyInstaller doesn't try to process loose
349
+ # framework binaries.
350
+ for entry in os.listdir(hook_config.temp_bin_dir):
351
+ entry_path = os.path.join(hook_config.temp_bin_dir, entry)
352
+ if entry_path == tar_path:
353
+ continue
354
+ if os.path.isdir(entry_path):
355
+ shutil.rmtree(entry_path, ignore_errors=True)
356
+ else:
357
+ os.remove(entry_path)
329
358
 
330
359
  # run PyInstaller!
331
360
  print("Running PyInstaller:", pyi_args)
@@ -151,11 +151,11 @@ class Command(BaseCommand):
151
151
 
152
152
  This method prepares the script/module path, selects transport
153
153
  configuration (port or UDS), resolves assets and ignore directories,
154
- starts the child app process through [`Handler`][(m).], and keeps the
154
+ starts the child app process through `Handler`, and keeps the
155
155
  observer running until termination.
156
156
 
157
157
  Args:
158
- options: Parsed command options produced by [`add_arguments`][(c).].
158
+ options: Parsed command options produced by :meth:`add_arguments`.
159
159
  """
160
160
 
161
161
  from flet.utils.pip import (
@@ -79,7 +79,7 @@ class Command(BaseCommand):
79
79
 
80
80
  def handler(*args, **kwargs):
81
81
  """
82
- Factory that binds [`CustomHandler`][(m).] to `directory`.
82
+ Factory that binds `CustomHandler` to `directory`.
83
83
  """
84
84
 
85
85
  return CustomHandler(
@@ -19,14 +19,14 @@ def run(args, cwd, env: Optional[dict] = None, capture_output=True, log=None):
19
19
  args: Command and arguments passed to the subprocess.
20
20
  cwd: Working directory for the command.
21
21
  env: Extra environment variables merged into the current process env.
22
- capture_output: If `True`, run with [`subprocess.run`][subprocess.run] and
22
+ capture_output: If `True`, run with `subprocess.run` and
23
23
  capture output in memory. If `False`, stream combined output line by line.
24
24
  log: Optional callback receiving each output line when `capture_output=False`.
25
25
 
26
26
  Returns:
27
- A completed [`subprocess.CompletedProcess`][subprocess.CompletedProcess]
27
+ A completed `subprocess.CompletedProcess`
28
28
  when `capture_output=True`, otherwise a finished
29
- [`subprocess.Popen`][subprocess.Popen] instance.
29
+ `subprocess.Popen` instance.
30
30
 
31
31
  Raises:
32
32
  KeyboardInterrupt: Re-raised after terminating the child process when
@@ -0,0 +1 @@
1
+ version = "0.84.0.dev0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flet-cli
3
- Version: 0.83.1
3
+ Version: 0.84.0.dev0
4
4
  Summary: Flet CLI
5
5
  Author-email: "Appveyor Systems Inc." <hello@flet.dev>
6
6
  License-Expression: Apache-2.0
@@ -9,7 +9,7 @@ Project-URL: Repository, https://github.com/flet-dev/flet
9
9
  Project-URL: Documentation, https://flet.dev/docs
10
10
  Requires-Python: >=3.10
11
11
  Description-Content-Type: text/markdown
12
- Requires-Dist: flet==0.83.1
12
+ Requires-Dist: flet==0.84.0.dev0
13
13
  Requires-Dist: watchdog>=4.0.0
14
14
  Requires-Dist: packaging>=25.0
15
15
  Requires-Dist: qrcode>=7.4.2
@@ -21,7 +21,7 @@ Requires-Dist: chardet<6
21
21
  # Flet CLI
22
22
 
23
23
  [![python](https://img.shields.io/badge/python-%3E%3D3.10-%2334D058)](https://pypi.org/project/flet-cli)
24
- [![docstring coverage](https://docs.flet.dev/assets/badges/docs-coverage/flet-cli.svg)](https://docs.flet.dev/assets/badges/docs-coverage/flet-cli.svg)
24
+ [![docstring coverage](https://flet.dev/docs/assets/badges/docs-coverage/flet-cli.svg)](https://flet.dev/docs/assets/badges/docs-coverage/flet-cli.svg)
25
25
 
26
26
  Flet CLI is a command-line interface tool for Flet, a framework for building interactive multi-platform applications using Python.
27
27
 
@@ -1,4 +1,4 @@
1
- flet==0.83.1
1
+ flet==0.84.0.dev0
2
2
  watchdog>=4.0.0
3
3
  packaging>=25.0
4
4
  qrcode>=7.4.2
@@ -1 +0,0 @@
1
- version = "0.83.1"
File without changes