From a2d354a3bf3d7b0f53f1be9fd8640080069ce80c Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Tue, 3 Jan 2023 13:33:09 -0800 Subject: [PATCH 1/3] Fix path to an icon --- sdk/python/flet/cli/commands/pack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/python/flet/cli/commands/pack.py b/sdk/python/flet/cli/commands/pack.py index 5e36a2d4d..3fe357560 100644 --- a/sdk/python/flet/cli/commands/pack.py +++ b/sdk/python/flet/cli/commands/pack.py @@ -114,7 +114,7 @@ def handle(self, options: argparse.Namespace) -> None: if options.icon: icon_path = options.icon if not Path(icon_path).is_absolute(): - icon_path = Path(os.getcwd()).joinpath(icon_path) + icon_path = str(Path(os.getcwd()).joinpath(icon_path)) update_flet_view_icon(str(exe_path), icon_path) # version info @@ -150,7 +150,7 @@ def handle(self, options: argparse.Namespace) -> None: if options.icon: icon_path = options.icon if not Path(icon_path).is_absolute(): - icon_path = Path(os.getcwd()).joinpath(icon_path) + icon_path = str(Path(os.getcwd()).joinpath(icon_path)) update_flet_view_icon(app_path, icon_path) # version info From 6696e8c615a9b80423b4bfa41a0b4b993550cce6 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Tue, 3 Jan 2023 13:41:07 -0800 Subject: [PATCH 2/3] Add `packaging` to dependencies --- sdk/python/pdm.lock | 2 +- sdk/python/pyproject.toml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sdk/python/pdm.lock b/sdk/python/pdm.lock index e8b2ca1c3..3dbb911c6 100644 --- a/sdk/python/pdm.lock +++ b/sdk/python/pdm.lock @@ -239,7 +239,7 @@ summary = "Backport of pathlib-compatible object wrapper for zip files" [metadata] lock_version = "4.0" -content_hash = "sha256:9bd1e399fac3187f9ca477a6d26e125417df67a1172333ed5232019feb419eef" +content_hash = "sha256:d0f252d1f7668578b6920f4df7c430b3b482f4aeadb3f686703debc8f88ba27e" [metadata.files] "attrs 22.1.0" = [ diff --git a/sdk/python/pyproject.toml b/sdk/python/pyproject.toml index 0bd3bef30..91546d9e5 100644 --- a/sdk/python/pyproject.toml +++ b/sdk/python/pyproject.toml @@ -13,7 +13,9 @@ dependencies = [ "repath>=0.9.0", "watchdog>=2.1.9", "requests>=2.28.1", - "oauthlib>=3.2.0"] + "oauthlib>=3.2.0", + "packaging>=22.0", +] requires-python = ">=3.7" license = { text = "MIT" } classifiers = [ From ea8cdf8b37d53a7ccfa4b1dec14019ec6a641f80 Mon Sep 17 00:00:00 2001 From: Feodor Fitsner Date: Tue, 3 Jan 2023 13:50:32 -0800 Subject: [PATCH 3/3] Display original error message --- sdk/python/flet/cli/commands/pack.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sdk/python/flet/cli/commands/pack.py b/sdk/python/flet/cli/commands/pack.py index 3fe357560..841b5ce96 100644 --- a/sdk/python/flet/cli/commands/pack.py +++ b/sdk/python/flet/cli/commands/pack.py @@ -174,6 +174,6 @@ def handle(self, options: argparse.Namespace) -> None: ): print("Deleting temp directory:", hook_config.temp_bin_dir) shutil.rmtree(hook_config.temp_bin_dir, ignore_errors=True) - except ImportError: - print("Please install PyInstaller module to use flet package command.") + except ImportError as e: + print("Please install PyInstaller module to use flet pack command:", e) exit(1)