flet-desktop-light 0.26.0.dev3957__py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl → 0.26.0.dev3999__py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
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_desktop/__init__.py +120 -83
- flet_desktop/app/flet-linux-arm64.tar.gz +0 -0
- flet_desktop/version.py +1 -1
- {flet_desktop_light-0.26.0.dev3957.dist-info → flet_desktop_light-0.26.0.dev3999.dist-info}/METADATA +3 -4
- flet_desktop_light-0.26.0.dev3999.dist-info/RECORD +6 -0
- {flet_desktop_light-0.26.0.dev3957.dist-info → flet_desktop_light-0.26.0.dev3999.dist-info}/WHEEL +1 -1
- flet_desktop_light-0.26.0.dev3957.dist-info/RECORD +0 -6
flet_desktop/__init__.py
CHANGED
@@ -2,6 +2,7 @@ import asyncio
|
|
2
2
|
import logging
|
3
3
|
import os
|
4
4
|
import signal
|
5
|
+
import stat
|
5
6
|
import subprocess
|
6
7
|
import tarfile
|
7
8
|
import tempfile
|
@@ -66,98 +67,129 @@ def __locate_and_unpack_flet_view(page_url, assets_dir, hidden):
|
|
66
67
|
pid_file = str(Path(tempfile.gettempdir()).joinpath(random_string(20)))
|
67
68
|
|
68
69
|
if is_windows():
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
)
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
if
|
78
|
-
|
79
|
-
|
70
|
+
flet_path = None
|
71
|
+
# try loading Flet client built with the latest run of `flet build`
|
72
|
+
build_windows = os.path.join(os.getcwd(), "build", "windows")
|
73
|
+
if os.path.exists(build_windows):
|
74
|
+
for f in os.listdir(build_windows):
|
75
|
+
if f.endswith(".exe"):
|
76
|
+
flet_path = os.path.join(build_windows, f)
|
77
|
+
|
78
|
+
if not flet_path:
|
79
|
+
flet_exe = "flet.exe"
|
80
|
+
temp_flet_dir = Path.home().joinpath(
|
81
|
+
".flet", "bin", f"flet-{flet_desktop.version.version}"
|
82
|
+
)
|
83
|
+
|
84
|
+
# check if flet_view.exe exists in "bin" directory (user mode)
|
85
|
+
flet_path = os.path.join(get_package_bin_dir(), "flet", flet_exe)
|
86
|
+
logger.info(f"Looking for Flet executable at: {flet_path}")
|
87
|
+
if os.path.exists(flet_path):
|
88
|
+
logger.info(f"Flet View found in: {flet_path}")
|
89
|
+
else:
|
90
|
+
# check if flet.exe is in FLET_VIEW_PATH (flet developer mode)
|
91
|
+
flet_path = os.environ.get("FLET_VIEW_PATH")
|
92
|
+
if flet_path and os.path.exists(flet_path):
|
93
|
+
logger.info(f"Flet View found in PATH: {flet_path}")
|
94
|
+
flet_path = os.path.join(flet_path, flet_exe)
|
95
|
+
else:
|
96
|
+
if not temp_flet_dir.exists():
|
97
|
+
zip_file = __download_flet_client("flet-windows.zip")
|
98
|
+
|
99
|
+
logger.info(
|
100
|
+
f"Extracting flet.exe from archive to {temp_flet_dir}"
|
101
|
+
)
|
102
|
+
temp_flet_dir.mkdir(parents=True, exist_ok=True)
|
103
|
+
with zipfile.ZipFile(zip_file, "r") as zip_arch:
|
104
|
+
zip_arch.extractall(str(temp_flet_dir))
|
105
|
+
flet_path = str(temp_flet_dir.joinpath("flet", flet_exe))
|
106
|
+
args = [flet_path, page_url, pid_file]
|
107
|
+
elif is_macos():
|
108
|
+
app_path = None
|
109
|
+
# try loading Flet client built with the latest run of `flet build`
|
110
|
+
build_macos = os.path.join(os.getcwd(), "build", "macos")
|
111
|
+
if os.path.exists(build_macos):
|
112
|
+
for f in os.listdir(build_macos):
|
113
|
+
if f.endswith(".app"):
|
114
|
+
app_path = os.path.join(build_macos, f)
|
115
|
+
|
116
|
+
if not app_path:
|
117
|
+
# build version-specific path to Flet.app
|
118
|
+
temp_flet_dir = Path.home().joinpath(
|
119
|
+
".flet", "bin", f"flet-{flet_desktop.version.version}"
|
120
|
+
)
|
121
|
+
|
80
122
|
# check if flet.exe is in FLET_VIEW_PATH (flet developer mode)
|
81
123
|
flet_path = os.environ.get("FLET_VIEW_PATH")
|
82
|
-
if flet_path
|
83
|
-
logger.info(f"Flet
|
84
|
-
|
124
|
+
if flet_path:
|
125
|
+
logger.info(f"Flet.app is set via FLET_VIEW_PATH: {flet_path}")
|
126
|
+
temp_flet_dir = Path(flet_path)
|
85
127
|
else:
|
128
|
+
# check if flet_view.app exists in a temp directory
|
86
129
|
if not temp_flet_dir.exists():
|
87
|
-
|
88
|
-
|
89
|
-
|
130
|
+
# check if flet.tar.gz exists
|
131
|
+
gz_filename = "flet-macos.tar.gz"
|
132
|
+
tar_file = os.path.join(get_package_bin_dir(), gz_filename)
|
133
|
+
logger.info(f"Looking for Flet.app archive at: {tar_file}")
|
134
|
+
if not os.path.exists(tar_file):
|
135
|
+
tar_file = __download_flet_client(gz_filename)
|
136
|
+
|
137
|
+
logger.info(f"Extracting Flet.app from archive to {temp_flet_dir}")
|
90
138
|
temp_flet_dir.mkdir(parents=True, exist_ok=True)
|
91
|
-
with
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
logger.info(f"Flet.app is set via FLET_VIEW_PATH: {flet_path}")
|
105
|
-
temp_flet_dir = Path(flet_path)
|
106
|
-
else:
|
107
|
-
# check if flet_view.app exists in a temp directory
|
108
|
-
if not temp_flet_dir.exists():
|
109
|
-
# check if flet.tar.gz exists
|
110
|
-
gz_filename = "flet-macos.tar.gz"
|
111
|
-
tar_file = os.path.join(get_package_bin_dir(), gz_filename)
|
112
|
-
logger.info(f"Looking for Flet.app archive at: {tar_file}")
|
113
|
-
if not os.path.exists(tar_file):
|
114
|
-
tar_file = __download_flet_client(gz_filename)
|
115
|
-
|
116
|
-
logger.info(f"Extracting Flet.app from archive to {temp_flet_dir}")
|
117
|
-
temp_flet_dir.mkdir(parents=True, exist_ok=True)
|
118
|
-
with tarfile.open(str(tar_file), "r:gz") as tar_arch:
|
119
|
-
safe_tar_extractall(tar_arch, str(temp_flet_dir))
|
120
|
-
else:
|
121
|
-
logger.info(f"Flet View found in: {temp_flet_dir}")
|
122
|
-
|
123
|
-
app_name = None
|
124
|
-
for f in os.listdir(temp_flet_dir):
|
125
|
-
if f.endswith(".app"):
|
126
|
-
app_name = f
|
127
|
-
assert app_name is not None, f"Application bundle not found in {temp_flet_dir}"
|
128
|
-
app_path = temp_flet_dir.joinpath(app_name)
|
139
|
+
with tarfile.open(str(tar_file), "r:gz") as tar_arch:
|
140
|
+
safe_tar_extractall(tar_arch, str(temp_flet_dir))
|
141
|
+
else:
|
142
|
+
logger.info(f"Flet View found in: {temp_flet_dir}")
|
143
|
+
|
144
|
+
app_name = None
|
145
|
+
for f in os.listdir(temp_flet_dir):
|
146
|
+
if f.endswith(".app"):
|
147
|
+
app_name = f
|
148
|
+
assert (
|
149
|
+
app_name is not None
|
150
|
+
), f"Application bundle not found in {temp_flet_dir}"
|
151
|
+
app_path = temp_flet_dir.joinpath(app_name)
|
129
152
|
args = ["open", str(app_path), "-n", "-W", "--args", page_url, pid_file]
|
130
153
|
elif is_linux():
|
131
|
-
# build version-specific path to flet folder
|
132
|
-
temp_flet_dir = Path.home().joinpath(
|
133
|
-
".flet", "bin", f"flet-{flet_desktop.version.version}"
|
134
|
-
)
|
135
|
-
|
136
154
|
app_path = None
|
137
|
-
#
|
138
|
-
|
139
|
-
if
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
155
|
+
# try loading Flet client built with the latest run of `flet build`
|
156
|
+
build_linux = os.path.join(os.getcwd(), "build", "linux")
|
157
|
+
if os.path.exists(build_linux):
|
158
|
+
for f in os.listdir(build_linux):
|
159
|
+
ef = os.path.join(build_linux, f)
|
160
|
+
if os.path.isfile(ef) and stat.S_IXUSR & os.stat(ef)[stat.ST_MODE]:
|
161
|
+
app_path = ef
|
162
|
+
|
163
|
+
if not app_path:
|
164
|
+
# build version-specific path to flet folder
|
165
|
+
temp_flet_dir = Path.home().joinpath(
|
166
|
+
".flet", "bin", f"flet-{flet_desktop.version.version}"
|
167
|
+
)
|
168
|
+
|
169
|
+
# check if flet.exe is in FLET_VIEW_PATH (flet developer mode)
|
170
|
+
flet_path = os.environ.get("FLET_VIEW_PATH")
|
171
|
+
if flet_path:
|
172
|
+
logger.info(f"Flet View is set via FLET_VIEW_PATH: {flet_path}")
|
173
|
+
temp_flet_dir = Path(flet_path)
|
174
|
+
app_path = temp_flet_dir.joinpath("flet")
|
157
175
|
else:
|
158
|
-
|
176
|
+
# check if flet_view.app exists in a temp directory
|
177
|
+
if not temp_flet_dir.exists():
|
178
|
+
# check if flet.tar.gz exists
|
179
|
+
gz_filename = f"flet-linux-{get_arch()}.tar.gz"
|
180
|
+
tar_file = os.path.join(get_package_bin_dir(), gz_filename)
|
181
|
+
logger.info(f"Looking for Flet bundle archive at: {tar_file}")
|
182
|
+
if not os.path.exists(tar_file):
|
183
|
+
tar_file = __download_flet_client(gz_filename)
|
184
|
+
|
185
|
+
logger.info(f"Extracting Flet from archive to {temp_flet_dir}")
|
186
|
+
temp_flet_dir.mkdir(parents=True, exist_ok=True)
|
187
|
+
with tarfile.open(str(tar_file), "r:gz") as tar_arch:
|
188
|
+
safe_tar_extractall(tar_arch, str(temp_flet_dir))
|
189
|
+
else:
|
190
|
+
logger.info(f"Flet View found in: {temp_flet_dir}")
|
159
191
|
|
160
|
-
|
192
|
+
app_path = temp_flet_dir.joinpath("flet", "flet")
|
161
193
|
args = [str(app_path), page_url, pid_file]
|
162
194
|
|
163
195
|
flet_env = {**os.environ}
|
@@ -173,8 +205,13 @@ def __locate_and_unpack_flet_view(page_url, assets_dir, hidden):
|
|
173
205
|
|
174
206
|
def __download_flet_client(file_name):
|
175
207
|
ver = flet_desktop.version.version
|
208
|
+
if not ver:
|
209
|
+
import flet.version
|
210
|
+
from flet.version import update_version
|
211
|
+
|
212
|
+
ver = flet.version.version or update_version()
|
176
213
|
temp_arch = Path(tempfile.gettempdir()).joinpath(file_name)
|
177
|
-
logger.info(f"Downloading Flet v{ver} to {temp_arch}")
|
178
214
|
flet_url = f"https://github.com/flet-dev/flet/releases/download/v{ver}/{file_name}"
|
215
|
+
logger.info(f"Downloading Flet v{ver} from {flet_url} to {temp_arch}")
|
179
216
|
urllib.request.urlretrieve(flet_url, temp_arch)
|
180
217
|
return str(temp_arch)
|
Binary file
|
flet_desktop/version.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
version = "0.26.0.
|
1
|
+
version = "0.26.0.dev3999"
|
{flet_desktop_light-0.26.0.dev3957.dist-info → flet_desktop_light-0.26.0.dev3999.dist-info}/METADATA
RENAMED
@@ -1,20 +1,19 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: flet-desktop-light
|
3
|
-
Version: 0.26.0.
|
3
|
+
Version: 0.26.0.dev3999
|
4
4
|
Summary: Flet Desktop client in Flutter
|
5
5
|
License: Apache-2.0
|
6
6
|
Author: Appveyor Systems Inc.
|
7
7
|
Author-email: hello@flet.dev
|
8
|
-
Requires-Python: >=3.
|
8
|
+
Requires-Python: >=3.9,<4.0
|
9
9
|
Classifier: License :: OSI Approved :: Apache Software License
|
10
10
|
Classifier: Programming Language :: Python :: 3
|
11
|
-
Classifier: Programming Language :: Python :: 3.8
|
12
11
|
Classifier: Programming Language :: Python :: 3.9
|
13
12
|
Classifier: Programming Language :: Python :: 3.10
|
14
13
|
Classifier: Programming Language :: Python :: 3.11
|
15
14
|
Classifier: Programming Language :: Python :: 3.12
|
16
15
|
Classifier: Programming Language :: Python :: 3.13
|
17
|
-
Requires-Dist: flet (==0.26.0.
|
16
|
+
Requires-Dist: flet (==0.26.0.dev3999)
|
18
17
|
Project-URL: Documentation, https://flet.dev/docs
|
19
18
|
Project-URL: Homepage, https://flet.dev
|
20
19
|
Project-URL: Repository, https://github.com/flet-dev/flet
|
@@ -0,0 +1,6 @@
|
|
1
|
+
flet_desktop/__init__.py,sha256=GU-Yzy2hPK_b7ZGzZYpHLh75C1tU-zqDAIXeNI2wdxE,8527
|
2
|
+
flet_desktop/version.py,sha256=3iKa2MU-M779BcyItkJzalT4JpecxIGEJT61CKe0pRk,27
|
3
|
+
flet_desktop/app/flet-linux-arm64.tar.gz,sha256=5N6gS5x5yoOgFa5UeHyhuRutg7Rk8M-oNaiMFNm8hxo,14777489
|
4
|
+
flet_desktop_light-0.26.0.dev3999.dist-info/METADATA,sha256=U_6lR8uywoo6NSeN0KGPQ3yzU4CTJjUdBTgX_pwr2sQ,907
|
5
|
+
flet_desktop_light-0.26.0.dev3999.dist-info/WHEEL,sha256=KH1WTkRRon2AuM86--Lc9bLpQoRMyX1K_58agfppVkg,143
|
6
|
+
flet_desktop_light-0.26.0.dev3999.dist-info/RECORD,,
|
@@ -1,6 +0,0 @@
|
|
1
|
-
flet_desktop/__init__.py,sha256=jgIHwfHykMzu6q0o7OfkGSnlRiFsgKUg4dOWANoDZcY,6760
|
2
|
-
flet_desktop/version.py,sha256=PVqV79xaXAjpE7l76K3l6M3sMEbh0lx2QbEMtjwjcb4,27
|
3
|
-
flet_desktop/app/flet-linux-arm64.tar.gz,sha256=2lAfcxJCW2XGgc5kV29mflNg_ZMC_ZqOR91835tp-7c,14778706
|
4
|
-
flet_desktop_light-0.26.0.dev3957.dist-info/METADATA,sha256=HExNKnKd-Dz8RbKpiyuLA0kkVeuD2Hb7mKVtitIV8XI,957
|
5
|
-
flet_desktop_light-0.26.0.dev3957.dist-info/WHEEL,sha256=024zPDL71K4172Vds09DYeD3PZYPsYtA1JCN2xvQxL4,143
|
6
|
-
flet_desktop_light-0.26.0.dev3957.dist-info/RECORD,,
|