Skip to content

Commit 5cf4d3e

Browse files
Fixes: Do not skip hidden files and .dist-info directories (#174)
* Fix: hidden files in site-packages are skipped when building macOS app Fix flet-dev/flet#5204 (comment) * Fix tests * Fix tests, again * Remove .dist-info from junk files * Update changelogs to note .dist-info metadata fix Added a changelog entry for all platforms documenting the fix that prevents deletion of package metadata in `.dist-info` directories, addressing issue #164. * Bump Flutter to 3.35.1, fix package command * Set default assetPath if null in package command Assigns 'app/app.zip' as the default assetPath when none is provided, ensuring a valid path is always set. Also refactors the logic for handling leading slashes in assetPath. * Rollback Flet version * Remove hideLoadingPage from FletApp and update dependencies The hideLoadingPage property was removed from FletApp instantiations in main.dart to align with recent API changes. Updated pubspec.lock files for flask_example, flet_example, and run_example to reflect new package versions and dependency updates. * Remove --pre flag from test scripts in Appveyor config Eliminated the '--pre' flag from all 'dart run serious_python:main' commands in the .appveyor.yml file for multiple platforms. This streamlines the test scripts and may resolve issues related to pre-release package handling. * Remove redundant '-r' flag from test scripts Cleaned up .appveyor.yml by removing duplicate '-r' flags from dart run commands in test_script sections for all platforms. This simplifies the test execution commands and avoids potential confusion. * Update Pyodide CDN URL to v0.28.3 Changed the pyodideRootUrl constant to use Pyodide version 0.28.3 instead of 0.27.2 for updated package support. * Update Pyodide platform tag to 2025.0 Changed the Pyodide platform tag from 'pyodide-2024.0-wasm32' to 'pyodide-2025.0-wasm32' to reflect the new version. * Revert "Update Pyodide platform tag to 2025.0" This reverts commit 8e7b5b7. * Update Pyodide CDN URL to v0.27.7 Changed the pyodideRootUrl constant to point to Pyodide version 0.27.7 instead of 0.28.3 for compatibility or stability reasons.
1 parent adf895d commit 5cf4d3e

File tree

30 files changed

+227
-189
lines changed

30 files changed

+227
-189
lines changed

.appveyor.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
skip_branch_with_pr: true
22

33
environment:
4-
FLUTTER_VERSION: 3.27.4
4+
FLUTTER_VERSION: 3.29.3
55
GITHUB_TOKEN:
66
secure: 9SKIwc3VSfYJ5IChvNR74mEv2nb0ZFftUzn3sGRdXipXEfKSxY50DoodChHvlqZduQNhjg0oyLWAAa3n+iwWvVM2yI7Cgb14lFNClijz/kHI/PibnjDMNvLKaAygcfAc
77

@@ -62,7 +62,7 @@ for:
6262
test_script:
6363
- export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages
6464
- cd src/serious_python/example/flet_example
65-
- dart run serious_python:main package app/src -p Darwin -r flet -r --pre
65+
- dart run serious_python:main package app/src -p Darwin -r flet
6666
- flutter test integration_test -d macos
6767

6868
# ======================================
@@ -89,7 +89,7 @@ for:
8989
test_script:
9090
- export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages
9191
- cd src/serious_python/example/flet_example
92-
- dart run serious_python:main package app/src -p iOS -r flet -r --pre
92+
- dart run serious_python:main package app/src -p iOS -r flet
9393
- flutter build ios --no-codesign
9494
# - flutter drive --driver=test_driver/integration_test.dart --target=integration_test/app_test.dart
9595

@@ -125,7 +125,7 @@ for:
125125
test_script:
126126
- export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages
127127
- cd src/serious_python/example/flet_example
128-
- dart run serious_python:main package app/src -p Android -r flet -r --pre
128+
- dart run serious_python:main package app/src -p Android -r flet
129129
- flutter test integration_test -d emulator-5554
130130

131131

@@ -153,7 +153,7 @@ for:
153153
test_script:
154154
- set SERIOUS_PYTHON_SITE_PACKAGES=%APPVEYOR_BUILD_FOLDER%\site-packages
155155
- cd src/serious_python/example/flet_example
156-
- dart run serious_python:main package app/src -p Windows -r flet -r --pre
156+
- dart run serious_python:main package app/src -p Windows -r flet
157157
- flutter test integration_test -d windows
158158

159159
# ======================================
@@ -174,7 +174,7 @@ for:
174174
test_script:
175175
- export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages
176176
- cd src/serious_python/example/flet_example
177-
- dart run serious_python:main package app/src -p Linux -r flet -r --pre
177+
- dart run serious_python:main package app/src -p Linux -r flet
178178
- xvfb-run flutter test integration_test -d linux
179179

180180
# ======================================
@@ -199,7 +199,7 @@ for:
199199
test_script:
200200
- export SERIOUS_PYTHON_SITE_PACKAGES=$APPVEYOR_BUILD_FOLDER/site-packages
201201
- cd src/serious_python/example/flet_example
202-
- dart run serious_python:main package app/src -p Linux -r flet -r --pre
202+
- dart run serious_python:main package app/src -p Linux -r flet
203203
- xvfb-run flutter test integration_test -d linux
204204

205205
# =========================================

.fvmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"flutter": "3.29.3"
3+
}

src/serious_python/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.9.3
2+
3+
* Fix: Hidden files in site-packages are skipped when building macOS app.
4+
* Fix: Do not delete package metadata in `.dist-info` directories ([#164](https://github.com/flet-dev/serious-python/issues/164)).
5+
16
## 0.9.2
27

38
* Breaking change: multiple `--requirements` options of `package` command must be passed as `--requirements DEP_1 --requirements DEP_2 ...` (or `-r DEP_1 -r DEP_2 ...`) instead of `-r DEP_1,DEP_2,...` to support dependency specifications with commas, e.g. `pandas>=2.2,<3`.

src/serious_python/bin/package_command.dart

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import 'macos_utils.dart' as macos_utils;
1515
import 'sitecustomize.dart';
1616

1717
const mobilePyPiUrl = "https://pypi.flet.dev";
18-
const pyodideRootUrl = "https://cdn.jsdelivr.net/pyodide/v0.27.2/full";
18+
const pyodideRootUrl = "https://cdn.jsdelivr.net/pyodide/v0.27.7/full";
1919
const pyodideLockFile = "pyodide-lock.json";
2020

2121
const buildPythonVersion = "3.12.9";
@@ -71,7 +71,6 @@ const junkFilesDesktop = [
7171
"**.pyx",
7272
"**.a",
7373
"**.pdb",
74-
"**.dist-info",
7574
"__pycache__",
7675
"**/__pycache__",
7776
];

src/serious_python/example/flask_example/pubspec.lock

Lines changed: 46 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -21,42 +21,42 @@ packages:
2121
dependency: transitive
2222
description:
2323
name: async
24-
sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
24+
sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb"
2525
url: "https://pub.dev"
2626
source: hosted
27-
version: "2.11.0"
27+
version: "2.13.0"
2828
boolean_selector:
2929
dependency: transitive
3030
description:
3131
name: boolean_selector
32-
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
32+
sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea"
3333
url: "https://pub.dev"
3434
source: hosted
35-
version: "2.1.1"
35+
version: "2.1.2"
3636
characters:
3737
dependency: transitive
3838
description:
3939
name: characters
40-
sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
40+
sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803
4141
url: "https://pub.dev"
4242
source: hosted
43-
version: "1.3.0"
43+
version: "1.4.0"
4444
clock:
4545
dependency: transitive
4646
description:
4747
name: clock
48-
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
48+
sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b
4949
url: "https://pub.dev"
5050
source: hosted
51-
version: "1.1.1"
51+
version: "1.1.2"
5252
collection:
5353
dependency: transitive
5454
description:
5555
name: collection
56-
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
56+
sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76"
5757
url: "https://pub.dev"
5858
source: hosted
59-
version: "1.18.0"
59+
version: "1.19.1"
6060
crypto:
6161
dependency: transitive
6262
description:
@@ -77,10 +77,10 @@ packages:
7777
dependency: transitive
7878
description:
7979
name: fake_async
80-
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
80+
sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44"
8181
url: "https://pub.dev"
8282
source: hosted
83-
version: "1.3.1"
83+
version: "1.3.3"
8484
ffi:
8585
dependency: transitive
8686
description:
@@ -143,18 +143,18 @@ packages:
143143
dependency: transitive
144144
description:
145145
name: leak_tracker
146-
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
146+
sha256: "6bb818ecbdffe216e81182c2f0714a2e62b593f4a4f13098713ff1685dfb6ab0"
147147
url: "https://pub.dev"
148148
source: hosted
149-
version: "10.0.4"
149+
version: "10.0.9"
150150
leak_tracker_flutter_testing:
151151
dependency: transitive
152152
description:
153153
name: leak_tracker_flutter_testing
154-
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
154+
sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573
155155
url: "https://pub.dev"
156156
source: hosted
157-
version: "3.0.3"
157+
version: "3.0.9"
158158
leak_tracker_testing:
159159
dependency: transitive
160160
description:
@@ -175,34 +175,34 @@ packages:
175175
dependency: transitive
176176
description:
177177
name: matcher
178-
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
178+
sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2
179179
url: "https://pub.dev"
180180
source: hosted
181-
version: "0.12.16+1"
181+
version: "0.12.17"
182182
material_color_utilities:
183183
dependency: transitive
184184
description:
185185
name: material_color_utilities
186-
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
186+
sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec
187187
url: "https://pub.dev"
188188
source: hosted
189-
version: "0.8.0"
189+
version: "0.11.1"
190190
meta:
191191
dependency: transitive
192192
description:
193193
name: meta
194-
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
194+
sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c
195195
url: "https://pub.dev"
196196
source: hosted
197-
version: "1.12.0"
197+
version: "1.16.0"
198198
path:
199199
dependency: transitive
200200
description:
201201
name: path
202-
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
202+
sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5"
203203
url: "https://pub.dev"
204204
source: hosted
205-
version: "1.9.0"
205+
version: "1.9.1"
206206
path_provider:
207207
dependency: transitive
208208
description:
@@ -281,42 +281,42 @@ packages:
281281
path: "../.."
282282
relative: true
283283
source: path
284-
version: "0.9.0"
284+
version: "0.9.3"
285285
serious_python_android:
286286
dependency: transitive
287287
description:
288288
path: "../../../serious_python_android"
289289
relative: true
290290
source: path
291-
version: "0.9.0"
291+
version: "0.9.3"
292292
serious_python_darwin:
293293
dependency: transitive
294294
description:
295295
path: "../../../serious_python_darwin"
296296
relative: true
297297
source: path
298-
version: "0.9.0"
298+
version: "0.9.3"
299299
serious_python_linux:
300300
dependency: transitive
301301
description:
302302
path: "../../../serious_python_linux"
303303
relative: true
304304
source: path
305-
version: "0.9.0"
305+
version: "0.9.3"
306306
serious_python_platform_interface:
307307
dependency: transitive
308308
description:
309309
path: "../../../serious_python_platform_interface"
310310
relative: true
311311
source: path
312-
version: "0.9.0"
312+
version: "0.9.3"
313313
serious_python_windows:
314314
dependency: transitive
315315
description:
316316
path: "../../../serious_python_windows"
317317
relative: true
318318
source: path
319-
version: "0.9.0"
319+
version: "0.9.3"
320320
shelf:
321321
dependency: transitive
322322
description:
@@ -329,55 +329,55 @@ packages:
329329
dependency: transitive
330330
description: flutter
331331
source: sdk
332-
version: "0.0.99"
332+
version: "0.0.0"
333333
source_span:
334334
dependency: transitive
335335
description:
336336
name: source_span
337-
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
337+
sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c"
338338
url: "https://pub.dev"
339339
source: hosted
340-
version: "1.10.0"
340+
version: "1.10.1"
341341
stack_trace:
342342
dependency: transitive
343343
description:
344344
name: stack_trace
345-
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
345+
sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1"
346346
url: "https://pub.dev"
347347
source: hosted
348-
version: "1.11.1"
348+
version: "1.12.1"
349349
stream_channel:
350350
dependency: transitive
351351
description:
352352
name: stream_channel
353-
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
353+
sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d"
354354
url: "https://pub.dev"
355355
source: hosted
356-
version: "2.1.2"
356+
version: "2.1.4"
357357
string_scanner:
358358
dependency: transitive
359359
description:
360360
name: string_scanner
361-
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
361+
sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43"
362362
url: "https://pub.dev"
363363
source: hosted
364-
version: "1.2.0"
364+
version: "1.4.1"
365365
term_glyph:
366366
dependency: transitive
367367
description:
368368
name: term_glyph
369-
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
369+
sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e"
370370
url: "https://pub.dev"
371371
source: hosted
372-
version: "1.2.1"
372+
version: "1.2.2"
373373
test_api:
374374
dependency: transitive
375375
description:
376376
name: test_api
377-
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
377+
sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd
378378
url: "https://pub.dev"
379379
source: hosted
380-
version: "0.7.0"
380+
version: "0.7.4"
381381
toml:
382382
dependency: transitive
383383
description:
@@ -406,10 +406,10 @@ packages:
406406
dependency: transitive
407407
description:
408408
name: vm_service
409-
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
409+
sha256: ddfa8d30d89985b96407efce8acbdd124701f96741f2d981ca860662f1c0dc02
410410
url: "https://pub.dev"
411411
source: hosted
412-
version: "14.2.1"
412+
version: "15.0.0"
413413
web:
414414
dependency: transitive
415415
description:
@@ -427,5 +427,5 @@ packages:
427427
source: hosted
428428
version: "1.0.4"
429429
sdks:
430-
dart: ">=3.4.0 <4.0.0"
430+
dart: ">=3.7.0-0 <4.0.0"
431431
flutter: ">=3.22.0"

src/serious_python/example/flet_example/app/src/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,10 @@ def check_ssl(e):
4444
ft.Row(
4545
[
4646
ft.IconButton(
47-
ft.icons.REMOVE, key="test:decrement", on_click=minus_click
47+
ft.Icons.REMOVE, key="test:decrement", on_click=minus_click
4848
),
4949
txt_number,
50-
ft.IconButton(ft.icons.ADD, key="test:increment", on_click=plus_click),
50+
ft.IconButton(ft.Icons.ADD, key="test:increment", on_click=plus_click),
5151
],
5252
alignment=ft.MainAxisAlignment.CENTER,
5353
expand=True,

src/serious_python/example/flet_example/app/src/main_async.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ async def plus_click(e):
2323
ft.Row(
2424
[
2525
ft.IconButton(
26-
ft.icons.REMOVE, key="test:decrement", on_click=minus_click
26+
ft.Icons.REMOVE, key="test:decrement", on_click=minus_click
2727
),
2828
txt_number,
29-
ft.IconButton(ft.icons.ADD, key="test:increment", on_click=plus_click),
29+
ft.IconButton(ft.Icons.ADD, key="test:increment", on_click=plus_click),
3030
],
3131
alignment=ft.MainAxisAlignment.CENTER,
3232
)
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
--pre
21
flet

0 commit comments

Comments
 (0)