fastled 1.2.38__py3-none-any.whl → 1.2.40__py3-none-any.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.
fastled/__init__.py CHANGED
@@ -16,7 +16,7 @@ from .types import BuildMode, CompileResult, CompileServerError
16
16
  # IMPORTANT! There's a bug in github which will REJECT any version update
17
17
  # that has any other change in the repo. Please bump the version as the
18
18
  # ONLY change in a commit, or else the pypi update and the release will fail.
19
- __version__ = "1.2.38"
19
+ __version__ = "1.2.40"
20
20
 
21
21
 
22
22
  class Api:
@@ -298,11 +298,7 @@ class Docker:
298
298
  if interactive:
299
299
  if sketch_folder is None:
300
300
  sketch_folder = project_root / "examples" / "wasm"
301
- else:
302
- if sketch_folder is not None:
303
- raise ValueError(
304
- "Cannot specify sketch_folder when not in interactive mode."
305
- )
301
+
306
302
  if isinstance(project_root, str):
307
303
  project_root = Path(project_root)
308
304
 
fastled/app.py CHANGED
@@ -60,17 +60,19 @@ def main() -> int:
60
60
  return 0
61
61
 
62
62
  if build:
63
- try:
64
- file_watcher_set(False)
65
- project_root = Path(".").absolute()
66
- print(f"Building Docker image at {project_root}")
67
- from fastled import Api, Docker
68
-
69
- server = Docker.spawn_server_from_fastled_repo(
70
- project_root=project_root, interactive=interactive
71
- )
72
- assert isinstance(server, CompileServer)
63
+ file_watcher_set(False)
64
+ project_root = Path(".").absolute()
65
+ print(f"Building Docker image at {project_root}")
66
+ from fastled import Api, Docker
67
+
68
+ server = Docker.spawn_server_from_fastled_repo(
69
+ project_root=project_root,
70
+ interactive=interactive,
71
+ sketch_folder=directory,
72
+ )
73
+ assert isinstance(server, CompileServer)
73
74
 
75
+ try:
74
76
  if interactive:
75
77
  server.stop()
76
78
  return 0
@@ -82,17 +84,19 @@ def main() -> int:
82
84
  return 0
83
85
 
84
86
  print("Running server")
87
+
85
88
  with Api.live_client(
86
89
  auto_updates=False,
87
90
  sketch_directory=directory,
88
91
  host=server,
89
92
  auto_start=True,
90
93
  keep_running=not just_compile,
91
- ) as client:
92
- print(f"Exited client {client.url()}")
93
- print(f"Exiting {server.name}")
94
+ ) as _:
95
+ while True:
96
+ time.sleep(0.2) # wait for user to exit
94
97
  except KeyboardInterrupt:
95
98
  print("\nExiting from client...")
99
+ server.stop()
96
100
  return 1
97
101
 
98
102
  if has_server:
@@ -106,12 +110,13 @@ def main() -> int:
106
110
  if __name__ == "__main__":
107
111
  # Note that the entry point for the exe is in cli.py
108
112
  try:
109
- sys.argv.append("-i")
113
+ sys.argv.append("-b")
110
114
  # sys.argv.append("examples/wasm")
111
115
  # sys.argv.append()
112
116
  import os
113
117
 
114
118
  os.chdir("../fastled")
119
+ sys.argv.append("examples/wasm")
115
120
  sys.exit(main())
116
121
  except KeyboardInterrupt:
117
122
  print("\nExiting from main...")
@@ -13,6 +13,7 @@ from fastled.docker_manager import (
13
13
  DockerManager,
14
14
  RunningContainer,
15
15
  )
16
+ from fastled.interactive_srcs import INTERACTIVE_SOURCES
16
17
  from fastled.settings import DEFAULT_CONTAINER_NAME, IMAGE_NAME, SERVER_PORT
17
18
  from fastled.sketch import looks_like_fastled_repo
18
19
  from fastled.types import BuildMode, CompileResult, CompileServerError
@@ -221,10 +222,7 @@ class CompileServerImpl:
221
222
  if self.fastled_src_dir is not None:
222
223
  # add volume for src/platforms/wasm/compiler/CMakelists.txt
223
224
  # to allow for interactive compilation
224
- interactive_sources = [
225
- "src/platforms/wasm/compiler/CMakeLists.txt",
226
- "src/platforms/wasm/compiler/build_archive.sh",
227
- ]
225
+ interactive_sources = list(INTERACTIVE_SOURCES)
228
226
  for src in interactive_sources:
229
227
  src_path = Path(src).absolute()
230
228
  if src_path.exists():
@@ -0,0 +1,5 @@
1
+ INTERACTIVE_SOURCES: list[str] = [
2
+ "src/platforms/wasm/compiler/CMakeLists.txt",
3
+ "src/platforms/wasm/compiler/build_archive.sh",
4
+ "src/platforms/wasm/compiler/build.sh",
5
+ ]
fastled/open_browser.py CHANGED
@@ -45,9 +45,8 @@ def open_http_server_subprocess(
45
45
  stderr=subprocess.DEVNULL,
46
46
  ) # type ignore
47
47
  except KeyboardInterrupt:
48
- import _thread
49
-
50
- _thread.interrupt_main()
48
+ print("Exiting from server...")
49
+ sys.exit(0)
51
50
 
52
51
 
53
52
  def is_port_free(port: int) -> bool:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: fastled
3
- Version: 1.2.38
3
+ Version: 1.2.40
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -37,6 +37,7 @@ Dynamic: maintainer
37
37
  [![Build Webpage](https://github.com/zackees/fastled-wasm/actions/workflows/build_webpage.yml/badge.svg)](https://github.com/zackees/fastled-wasm/actions/workflows/build_webpage.yml)
38
38
 
39
39
 
40
+
40
41
  ## Compile your FastLED sketch and run it on the Browser!
41
42
 
42
43
  ![image](https://github.com/user-attachments/assets/243aeb4d-e42f-4cc3-9c31-0af51271f3e0)
@@ -1,14 +1,15 @@
1
- fastled/__init__.py,sha256=EMGIHk8k4c_BU_-hXMaPDntdxPyOQYPIh8jBsBIMwVs,13035
2
- fastled/app.py,sha256=dnbDSVpn7_wB3JZl-JAIROYbmmy0-K1RTyi7CaktKsc,3696
1
+ fastled/__init__.py,sha256=Ha6cPWlT-RRMkKSUD-c5cAzd5BDh3nNn7R63jPIYCeQ,12847
2
+ fastled/app.py,sha256=6EE7mRcKKFm1wTyvpk3zy6OtlbHovSlDGU8bSq-Pjws,3763
3
3
  fastled/cli.py,sha256=FjVr31ht0UPlAcmX-84NwfAGMQHTkrCe4o744jCAxiw,375
4
4
  fastled/client_server.py,sha256=Q_-ALIbp474gY1zkYHoaU36eVSIa87nRcSB6IZOoaCg,14315
5
5
  fastled/compile_server.py,sha256=ul3eiZNX2wwmInooo3PJC3_kNpdejYVDIo94G3sV9HQ,2941
6
- fastled/compile_server_impl.py,sha256=ygE471lKGidQKYnGNRt-PRYtf3MW1i293QT5ULuOhLE,10048
6
+ fastled/compile_server_impl.py,sha256=vCuy4RlMm1FTJ6Xp6eFjV84xLVtLpdCaStz0N7Bi3n8,9977
7
7
  fastled/docker_manager.py,sha256=cIxOSeHnDqrT5IWPP1sl1cF8XYy3sUNfoOE-JpuKr3U,29815
8
8
  fastled/filewatcher.py,sha256=XjFTo6NvEaosGTPr2Uhj91aqmtFdYHzJfxPzjBTMkKA,7086
9
+ fastled/interactive_srcs.py,sha256=BZJ2IJNzUg4BuE_QWyD_y_xX978clY5CMzTSz8lvFcw,183
9
10
  fastled/keyboard.py,sha256=vyYxE98WCXjvMpcUJd0YXPVvt7TzvBmifLYI-K7jtKg,3524
10
11
  fastled/live_client.py,sha256=MDauol0mxtXggV1Pv9ahC0Jjg_4wnnV6FjGEtdd9cxU,2763
11
- fastled/open_browser.py,sha256=DDzOXNYVYLIDWVdmpJ-jLxZSAs5mw3VGHo2UIJ-T8SE,4339
12
+ fastled/open_browser.py,sha256=KX2h9PUaPsKcwZ84i01DrXOnNpvaKLpB63u5kzcnEKQ,4342
12
13
  fastled/open_browser2.py,sha256=jUgN81bEYX-sr0zKTVJkwj9tXEVq7aZTxGUP_ShyCbs,3614
13
14
  fastled/parse_args.py,sha256=d0Aa_XPOpTjgxkBPZ_UyG-xNP9PgEjBQgrtzykVBeSc,7887
14
15
  fastled/paths.py,sha256=VsPmgu0lNSCFOoEC0BsTYzDygXqy15AHUfN-tTuzDZA,99
@@ -25,9 +26,9 @@ fastled/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
25
26
  fastled/site/build.py,sha256=l4RajIk0bApiAifT1lyLjIZi9lpPtSba4cnwWP5UOKc,14064
26
27
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
27
28
  fastled/test/examples.py,sha256=GfaHeY1E8izBl6ZqDVjz--RHLyVR4NRnQ5pBesCFJFY,1673
28
- fastled-1.2.38.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
29
- fastled-1.2.38.dist-info/METADATA,sha256=K3BK-FQqkndHCj34Xbr4l09USCoyqlyY2FpExknvFEA,21261
30
- fastled-1.2.38.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
31
- fastled-1.2.38.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
32
- fastled-1.2.38.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
33
- fastled-1.2.38.dist-info/RECORD,,
29
+ fastled-1.2.40.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
30
+ fastled-1.2.40.dist-info/METADATA,sha256=j_9e9ixRE1iug38SmM1rwts7rtakFyeasDZ7UNSIDLw,21262
31
+ fastled-1.2.40.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
32
+ fastled-1.2.40.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
33
+ fastled-1.2.40.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
34
+ fastled-1.2.40.dist-info/RECORD,,