fastled 1.2.28__py3-none-any.whl → 1.2.30__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
@@ -15,7 +15,7 @@ from .types import BuildMode, CompileResult, CompileServerError
15
15
  # IMPORTANT! There's a bug in github which will REJECT any version update
16
16
  # that has any other change in the repo. Please bump the version as the
17
17
  # ONLY change in a commit, or else the pypi update and the release will fail.
18
- __version__ = "1.2.28"
18
+ __version__ = "1.2.30"
19
19
 
20
20
 
21
21
  class Api:
@@ -81,6 +81,7 @@ class Api:
81
81
  interactive=False,
82
82
  auto_updates=None,
83
83
  auto_start=True,
84
+ mapped_dir: Path | None = None,
84
85
  container_name: str | None = None,
85
86
  ) -> CompileServer:
86
87
  from fastled.compile_server import CompileServer
@@ -89,7 +90,7 @@ class Api:
89
90
  container_name=container_name,
90
91
  interactive=interactive,
91
92
  auto_updates=auto_updates,
92
- mapped_dir=None,
93
+ mapped_dir=mapped_dir,
93
94
  auto_start=auto_start,
94
95
  )
95
96
  return out
@@ -100,12 +101,14 @@ class Api:
100
101
  interactive=False,
101
102
  auto_updates=None,
102
103
  auto_start=True,
104
+ mapped_dir: Path | None = None,
103
105
  container_name: str | None = None,
104
106
  ) -> Generator[CompileServer, None, None]:
105
107
  server = Api.spawn_server(
106
108
  interactive=interactive,
107
109
  auto_updates=auto_updates,
108
110
  auto_start=auto_start,
111
+ mapped_dir=mapped_dir,
109
112
  container_name=container_name,
110
113
  )
111
114
  try:
fastled/app.py CHANGED
@@ -44,14 +44,27 @@ def run_server(args: argparse.Namespace) -> int:
44
44
 
45
45
  def main() -> int:
46
46
  args = parse_args()
47
- if args.update:
47
+ interactive: bool = args.interactive
48
+ server: str | CompileServer | None = args.server
49
+ update: bool = args.update
50
+ build: bool = args.build
51
+ just_compile: bool = args.just_compile
52
+ directory: Path | None = Path(args.directory).absolute() if args.directory else None
53
+
54
+ if directory is None and interactive:
55
+ # if examples/wasm exists
56
+ if Path("examples/wasm").exists():
57
+ print(f"Using {Path('examples/wasm')} as the sketch directory")
58
+ directory = Path("examples/wasm").absolute()
59
+
60
+ if update:
48
61
  # Force auto_update to ensure update check happens
49
62
  compile_server = CompileServer(interactive=False, auto_updates=True)
50
63
  compile_server.stop()
51
64
  print("Finished updating.")
52
65
  return 0
53
66
 
54
- if args.build:
67
+ if build:
55
68
  try:
56
69
  project_root = Path(".").absolute()
57
70
  print(f"Building Docker image at {project_root}")
@@ -61,15 +74,18 @@ def main() -> int:
61
74
  project_root=project_root
62
75
  )
63
76
  print(f"Built Docker image: {docker_image_name}")
64
- if not args.directory:
77
+ if not directory:
65
78
  print("No sketch directory specified. So exiting...")
66
79
  return 0
67
80
  print("Running server")
68
81
  with Api.server(
69
- auto_updates=False, container_name=docker_image_name
82
+ auto_updates=False,
83
+ container_name=docker_image_name,
84
+ interactive=interactive,
85
+ mapped_dir=directory,
70
86
  ) as server:
71
87
  sketch_dir = Path("examples/wasm")
72
- if args.just_compile:
88
+ if just_compile:
73
89
  rtn = run_client(
74
90
  directory=sketch_dir,
75
91
  host=server,
@@ -90,7 +106,7 @@ def main() -> int:
90
106
  print("\nExiting from client...")
91
107
  return 1
92
108
 
93
- if args.server:
109
+ if server:
94
110
  print("Running in server only mode.")
95
111
  return run_server(args)
96
112
  else:
@@ -101,6 +117,11 @@ def main() -> int:
101
117
  if __name__ == "__main__":
102
118
  # Note that the entry point for the exe is in cli.py
103
119
  try:
120
+ sys.argv.append("-b")
121
+ sys.argv.append("-i")
122
+ import os
123
+
124
+ os.chdir("../fastled")
104
125
  sys.exit(main())
105
126
  except KeyboardInterrupt:
106
127
  print("\nExiting from main...")
@@ -1,4 +1,5 @@
1
1
  import subprocess
2
+ import sys
2
3
  import time
3
4
  import warnings
4
5
  from datetime import datetime, timezone
@@ -69,6 +70,10 @@ class CompileServerImpl:
69
70
  if wait_for_startup:
70
71
  ok = self.wait_for_startup()
71
72
  if not ok:
73
+ if self.interactive:
74
+ print("Exited from container.")
75
+ sys.exit(0)
76
+ return
72
77
  raise CompileServerError("Server did not start")
73
78
  if not self.interactive:
74
79
  msg = f"# FastLED Compile Server started at {self.url()} #"
fastled/docker_manager.py CHANGED
@@ -544,7 +544,7 @@ class DockerManager:
544
544
  docker_command.append(command)
545
545
  cmd_str: str = subprocess.list2cmdline(docker_command)
546
546
  print(f"Running command: {cmd_str}")
547
- subprocess.run(docker_command, check=True)
547
+ subprocess.run(docker_command, check=False)
548
548
  except subprocess.CalledProcessError as e:
549
549
  print(f"Error running Docker command: {e}")
550
550
  diff = time.time() - start_time
fastled/filewatcher.py CHANGED
@@ -1,5 +1,4 @@
1
- """File system watcher implementation using watchdog
2
- """
1
+ """File system watcher implementation using watchdog"""
3
2
 
4
3
  import hashlib
5
4
  import os
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: fastled
3
- Version: 1.2.28
3
+ Version: 1.2.30
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -1,11 +1,11 @@
1
- fastled/__init__.py,sha256=bqty0DzlDrNN6lr5blnYGepOaRashcnhB4SJmi76b5U,11084
2
- fastled/app.py,sha256=uK-Ag2R4-FB6PyKorVOpBsujGn-jO7aYJEY8Kw76vc0,3512
1
+ fastled/__init__.py,sha256=hp7u_kd2j03u0duINhqIYse6uptL3srBEAlOG9X5jxU,11205
2
+ fastled/app.py,sha256=DeKOay8pTu1hWkCqTlAiEGcE45FmoWStoDGPh2V3d4E,4233
3
3
  fastled/cli.py,sha256=FjVr31ht0UPlAcmX-84NwfAGMQHTkrCe4o744jCAxiw,375
4
4
  fastled/client_server.py,sha256=eORWVyI1PvyowmhLWt3V9aI_AemPSBL9bAkjMBD2kAw,14282
5
5
  fastled/compile_server.py,sha256=g0y9vEZqpzAJEUwketV8lbwI8VZNSSLuOuwcF04k-dw,2775
6
- fastled/compile_server_impl.py,sha256=U_k2S_BRKVEGrqfXjVNMy5H1v4JtC4SlhRy5hwBL3_0,9736
7
- fastled/docker_manager.py,sha256=HJDl533G5mCBCSqMZhtdP7mhurx3cLPQU3T-DTWC9xU,29814
8
- fastled/filewatcher.py,sha256=LwEQJkqADsArZyY499RLAer6JjJyDwaQBcAvT7xmp3c,6708
6
+ fastled/compile_server_impl.py,sha256=JY7cDwFR1qZ05UtPkpCzkrylibpSMVlt7zudI6mnoYM,9895
7
+ fastled/docker_manager.py,sha256=cIxOSeHnDqrT5IWPP1sl1cF8XYy3sUNfoOE-JpuKr3U,29815
8
+ fastled/filewatcher.py,sha256=9zjA2cJMSNioaas_igurElSzBOu9To4CPnV-tthDMvg,6707
9
9
  fastled/keyboard.py,sha256=vyYxE98WCXjvMpcUJd0YXPVvt7TzvBmifLYI-K7jtKg,3524
10
10
  fastled/live_client.py,sha256=b9mVJ-8w_zoEDwKIlAEUC5Q1La5W5rR6ct-exOcgJec,2561
11
11
  fastled/open_browser.py,sha256=DDzOXNYVYLIDWVdmpJ-jLxZSAs5mw3VGHo2UIJ-T8SE,4339
@@ -25,9 +25,9 @@ fastled/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
25
25
  fastled/site/build.py,sha256=l4RajIk0bApiAifT1lyLjIZi9lpPtSba4cnwWP5UOKc,14064
26
26
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
27
27
  fastled/test/examples.py,sha256=6xPwx_k9_XwYTpI1nk4SrYbsJKHJACd30GzD1epGqhY,1597
28
- fastled-1.2.28.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
29
- fastled-1.2.28.dist-info/METADATA,sha256=Cwg1AYATtsQJkMhurqAJFGwMu7DHv-5EDsOXCDMRqPo,21176
30
- fastled-1.2.28.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
31
- fastled-1.2.28.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
32
- fastled-1.2.28.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
33
- fastled-1.2.28.dist-info/RECORD,,
28
+ fastled-1.2.30.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
29
+ fastled-1.2.30.dist-info/METADATA,sha256=yTlr6UHXMo0moswF8vqksLz6p5pgm2ETfCquLoKillc,21176
30
+ fastled-1.2.30.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
31
+ fastled-1.2.30.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
32
+ fastled-1.2.30.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
33
+ fastled-1.2.30.dist-info/RECORD,,