fastled 1.2.77__py3-none-any.whl → 1.2.78__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
@@ -14,7 +14,7 @@ from .types import BuildMode, CompileResult, CompileServerError
14
14
  # IMPORTANT! There's a bug in github which will REJECT any version update
15
15
  # that has any other change in the repo. Please bump the version as the
16
16
  # ONLY change in a commit, or else the pypi update and the release will fail.
17
- __version__ = "1.2.77"
17
+ __version__ = "1.2.78"
18
18
 
19
19
 
20
20
  class Api:
fastled/client_server.py CHANGED
@@ -381,12 +381,12 @@ def run_client_server(args: Args) -> int:
381
381
  url, compile_server = _try_start_server_or_get_url(auto_update, web, localhost)
382
382
  except KeyboardInterrupt:
383
383
  print("\nExiting from first try...")
384
- if compile_server:
384
+ if compile_server is not None:
385
385
  compile_server.stop()
386
386
  return 1
387
387
  except Exception as e:
388
388
  print(f"Error: {e}")
389
- if compile_server:
389
+ if compile_server is not None:
390
390
  compile_server.stop()
391
391
  return 1
392
392
 
@@ -15,7 +15,6 @@ from fastled.docker_manager import (
15
15
  RunningContainer,
16
16
  Volume,
17
17
  )
18
- from fastled.interactive_srcs import INTERACTIVE_SOURCES
19
18
  from fastled.settings import DEFAULT_CONTAINER_NAME, IMAGE_NAME, SERVER_PORT
20
19
  from fastled.sketch import looks_like_fastled_repo
21
20
  from fastled.types import BuildMode, CompileResult, CompileServerError
@@ -43,7 +42,7 @@ def _port_is_free(port: int) -> bool:
43
42
 
44
43
  with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as sock:
45
44
  try:
46
- sock.bind(("localhost", port)) and sock.bind(("0.0.0.0", port))
45
+ _ = sock.bind(("localhost", port)) and sock.bind(("0.0.0.0", port))
47
46
  return True
48
47
  except OSError:
49
48
  return False
@@ -269,20 +268,39 @@ class CompileServerImpl:
269
268
  )
270
269
  if self.fastled_src_dir is not None:
271
270
  # to allow for interactive compilation
272
- interactive_sources = list(INTERACTIVE_SOURCES)
273
- for src in interactive_sources:
274
- src_path = Path(src).absolute()
271
+ # interactive_sources = list(INTERACTIVE_SOURCES)
272
+ interactive_sources: list[tuple[Path, str]] = []
273
+ init_runtime_py = (
274
+ Path(self.fastled_src_dir)
275
+ / ".."
276
+ / ".."
277
+ / "fastled-wasm"
278
+ / "compiler"
279
+ / "init_runtime.py"
280
+ )
281
+ if init_runtime_py.exists():
282
+ # fastled-wasm is in a sister directory, mapping this in to the container.
283
+ mapping = (
284
+ init_runtime_py,
285
+ "/js/init_runtime.py",
286
+ )
287
+ interactive_sources.append(mapping)
288
+
289
+ src_host: Path
290
+ dst_container: str
291
+ for src_host, dst_container in interactive_sources:
292
+ src_path = Path(src_host).absolute()
275
293
  if src_path.exists():
276
- print(f"Mounting {src} into container")
294
+ print(f"Mounting {src_host} into container")
277
295
  volumes.append(
278
296
  Volume(
279
297
  host_path=str(src_path),
280
- container_path=f"/js/fastled/{src}",
298
+ container_path=dst_container,
281
299
  mode="rw",
282
300
  )
283
301
  )
284
302
  else:
285
- print(f"Could not find {src}")
303
+ print(f"Could not find {src_path}")
286
304
 
287
305
  cmd_str = subprocess.list2cmdline(server_command)
288
306
  if not self.interactive:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastled
3
- Version: 1.2.77
3
+ Version: 1.2.78
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -1,14 +1,13 @@
1
- fastled/__init__.py,sha256=jcXru6wq69PDDaohulLi5gYXikZoeAqi7YJVuNV-LJg,6680
1
+ fastled/__init__.py,sha256=OO3Y9-Fio1wpJ92Fg2E6kWYfjOkaq6N_LwI0wWwGRu0,6680
2
2
  fastled/app.py,sha256=0W8Mbplo5UCRzj7nMVgkmCBddQGufsUQjkUUT4pMp74,4611
3
3
  fastled/cli.py,sha256=FjVr31ht0UPlAcmX-84NwfAGMQHTkrCe4o744jCAxiw,375
4
4
  fastled/cli_test.py,sha256=qJB9yLRFR3OwOwdIWSQ0fQsWLnA37v5pDccufiP_hTs,512
5
5
  fastled/cli_test_interactive.py,sha256=BjNhveZOk5aCffHbcrxPQQjWmAuj4ClVKKcKX5eY6yM,542
6
- fastled/client_server.py,sha256=eG82h-27Y40szCew976lv9I6bP-YxtRV6sFNDVNTapo,14525
6
+ fastled/client_server.py,sha256=_M3EsHOLlQI610qxcmBCLa2K5ERmNHpF1cI2C_xzkmk,14549
7
7
  fastled/compile_server.py,sha256=rkXvrvdav5vDG8lv_OlBX3YSCHtnHMt25nXbfeg_r78,2960
8
- fastled/compile_server_impl.py,sha256=dfybPABcSu1Go0CaqpUP56vbaELMlr-ER-CwSYhaCCE,11903
8
+ fastled/compile_server_impl.py,sha256=_DRdt-eWTdOr2mXvO7h6dKqDSonsm523bIqCZr4wf2k,12615
9
9
  fastled/docker_manager.py,sha256=SC_qV6grNTGh0QD1ubKrULQblrN-2PORocISlaZg9NQ,35156
10
10
  fastled/filewatcher.py,sha256=3qS3L7zMQhFuVrkeGn1djsB_cB6x_E2YGJmmQWVAU_w,10033
11
- fastled/interactive_srcs.py,sha256=F5nHdJc60xsnmOtnKhngE9JytqGn56PmYw_MVSIX1ac,138
12
11
  fastled/keyboard.py,sha256=UTAsqCn1UMYnB8YDzENiLTj4GeL45tYfEcO7_5fLFEg,3556
13
12
  fastled/keyz.py,sha256=LO-8m_7CpNDiZLM-FXhQ30f9gN1bUYz5lOsUPTIbI-c,4020
14
13
  fastled/live_client.py,sha256=MDauol0mxtXggV1Pv9ahC0Jjg_4wnnV6FjGEtdd9cxU,2763
@@ -36,9 +35,9 @@ fastled/site/build.py,sha256=2YKU_UWKlJdGnjdbAbaL0co6kceFMSTVYwH1KCmgPZA,13987
36
35
  fastled/site/examples.py,sha256=s6vj2zJc6BfKlnbwXr1QWY1mzuDBMt6j5MEBOWjO_U8,155
37
36
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
38
37
  fastled/test/examples.py,sha256=GfaHeY1E8izBl6ZqDVjz--RHLyVR4NRnQ5pBesCFJFY,1673
39
- fastled-1.2.77.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
40
- fastled-1.2.77.dist-info/METADATA,sha256=8iJ_j3x7Iemf1vLZr3-eLPDE2pFfSXs_ObEs1A0XC4Y,22065
41
- fastled-1.2.77.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
42
- fastled-1.2.77.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
43
- fastled-1.2.77.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
44
- fastled-1.2.77.dist-info/RECORD,,
38
+ fastled-1.2.78.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
39
+ fastled-1.2.78.dist-info/METADATA,sha256=vzbxAQY1Pvv7RNJOj_Fx1Cot8ReBujjBgYcoltrNis8,22065
40
+ fastled-1.2.78.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
41
+ fastled-1.2.78.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
42
+ fastled-1.2.78.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
43
+ fastled-1.2.78.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- INTERACTIVE_SOURCES: list[str] = [
2
- "/js/compiler/CMakeLists.txt",
3
- "/js/compiler/build_archive.sh",
4
- "/js/compiler/build.sh",
5
- ]