fastled 1.3.6__py3-none-any.whl → 1.3.10__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/__version__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  # IMPORTANT! There's a bug in github which will REJECT any version update
2
2
  # that has any other change in the repo. Please bump the version as the
3
3
  # ONLY change in a commit, or else the pypi update and the release will fail.
4
- __version__ = "1.3.6"
4
+ __version__ = "1.3.10"
5
5
 
6
6
  __version_url_latest__ = "https://raw.githubusercontent.com/zackees/fastled-wasm/refs/heads/main/src/fastled/__version__.py"
fastled/app.py CHANGED
@@ -31,6 +31,7 @@ def run_server(args: Args) -> int:
31
31
  auto_updates=auto_update,
32
32
  mapped_dir=mapped_dir,
33
33
  auto_start=True,
34
+ remove_previous=args.clear,
34
35
  )
35
36
 
36
37
  if not interactive:
@@ -112,7 +113,7 @@ def main() -> int:
112
113
  auto_updates=False,
113
114
  mapped_dir=directory,
114
115
  auto_start=False,
115
- remove_previous=False,
116
+ remove_previous=args.clear,
116
117
  )
117
118
 
118
119
  server.start(wait_for_startup=False)
fastled/args.py CHANGED
@@ -22,6 +22,7 @@ class Args:
22
22
  quick: bool
23
23
  release: bool
24
24
  ram_disk_size: str # suffixed liked "25mb" or "1gb"
25
+ clear = False # Force the last running container to be removed. Useful for benchmarking.
25
26
 
26
27
  @staticmethod
27
28
  def from_namespace(args: argparse.Namespace) -> "Args":
fastled/client_server.py CHANGED
@@ -129,7 +129,7 @@ def _run_web_compiler(
129
129
 
130
130
 
131
131
  def _try_start_server_or_get_url(
132
- auto_update: bool, args_web: str | bool, localhost: bool
132
+ auto_update: bool, args_web: str | bool, localhost: bool, clear: bool
133
133
  ) -> tuple[str, CompileServer | None]:
134
134
  is_local_host = localhost or (
135
135
  isinstance(args_web, str)
@@ -159,7 +159,9 @@ def _try_start_server_or_get_url(
159
159
  else:
160
160
  try:
161
161
  print("No local server found, starting one...")
162
- compile_server = CompileServer(auto_updates=auto_update)
162
+ compile_server = CompileServer(
163
+ auto_updates=auto_update, remove_previous=clear
164
+ )
163
165
  print("Waiting for the local compiler to start...")
164
166
  if not compile_server.ping():
165
167
  print("Failed to start local compiler.")
@@ -172,7 +174,7 @@ def _try_start_server_or_get_url(
172
174
  return (DEFAULT_URL, None)
173
175
 
174
176
 
175
- def _try_make_compile_server() -> CompileServer | None:
177
+ def _try_make_compile_server(clear: bool = False) -> CompileServer | None:
176
178
  if not DockerManager.is_docker_installed():
177
179
  return None
178
180
  try:
@@ -184,7 +186,7 @@ def _try_make_compile_server() -> CompileServer | None:
184
186
  free_port = find_free_port(start_port=9723, end_port=9743)
185
187
  if free_port is None:
186
188
  return None
187
- compile_server = CompileServer(auto_updates=False)
189
+ compile_server = CompileServer(auto_updates=False, remove_previous=clear)
188
190
  print("Waiting for the local compiler to start...")
189
191
  if not compile_server.ping():
190
192
  print("Failed to start local compiler.")
@@ -222,13 +224,14 @@ def run_client(
222
224
  http_port: (
223
225
  int | None
224
226
  ) = None, # None means auto select a free port, http_port < 0 means no server.
227
+ clear: bool = False,
225
228
  ) -> int:
226
229
  has_checked_newer_version_yet = False
227
230
  compile_server: CompileServer | None = None
228
231
 
229
232
  if host is None:
230
233
  # attempt to start a compile server if docker is installed.
231
- compile_server = _try_make_compile_server()
234
+ compile_server = _try_make_compile_server(clear=clear)
232
235
  if compile_server is None:
233
236
  host = DEFAULT_URL
234
237
  elif isinstance(host, CompileServer):
@@ -485,7 +488,9 @@ def run_client_server(args: Args) -> int:
485
488
  url: str
486
489
  compile_server: CompileServer | None = None
487
490
  try:
488
- url, compile_server = _try_start_server_or_get_url(auto_update, web, localhost)
491
+ url, compile_server = _try_start_server_or_get_url(
492
+ auto_update, web, localhost, args.clear
493
+ )
489
494
  except KeyboardInterrupt:
490
495
  print("\nExiting from first try...")
491
496
  if compile_server is not None:
@@ -505,6 +510,7 @@ def run_client_server(args: Args) -> int:
505
510
  keep_running=not just_compile,
506
511
  build_mode=build_mode,
507
512
  profile=profile,
513
+ clear=args.clear,
508
514
  )
509
515
  except KeyboardInterrupt:
510
516
  return 1
fastled/docker_manager.py CHANGED
@@ -36,6 +36,9 @@ _IS_GITHUB = "GITHUB_ACTIONS" in os.environ
36
36
  _DEFAULT_BUILD_DIR = "/js/.pio/build"
37
37
 
38
38
 
39
+ os.environ.get("FASTLED_FORCE_CLEAR", "0") == "1"
40
+
41
+
39
42
  # Docker uses datetimes in UTC but without the timezone info. If we pass in a tz
40
43
  # then it will throw an exception.
41
44
  def _utc_now_no_tz() -> datetime:
@@ -65,6 +68,10 @@ def get_ramdisk_size() -> str | None:
65
68
  return None # Defaults to off
66
69
 
67
70
 
71
+ def set_clear() -> None:
72
+ os.environ["FASTLED_FORCE_CLEAR"] = "1"
73
+
74
+
68
75
  def _win32_docker_location() -> str | None:
69
76
  home_dir = Path.home()
70
77
  out = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastled
3
- Version: 1.3.6
3
+ Version: 1.3.10
4
4
  Summary: FastLED Wasm Compiler
5
5
  Home-page: https://github.com/zackees/fastled-wasm
6
6
  Maintainer: Zachary Vorhies
@@ -1,14 +1,14 @@
1
1
  fastled/__init__.py,sha256=YLikXGRWKlKAqj7bpvGmJLejGTFF-FC1lv2z1jwRinA,6852
2
- fastled/__version__.py,sha256=7a4fREDgqwqn8rf_S0Gr_RG5Ws6Mlha1HODKaTjPHU8,372
3
- fastled/app.py,sha256=1N5Q486YccaWCRqnaI2F04ktL64NAVjAN6i4c-zgm1o,5818
4
- fastled/args.py,sha256=E-CElEDTqRrI0wDyu-nt9Rj0FiTG6y-Xq_w91Dt0J_g,3186
2
+ fastled/__version__.py,sha256=7QpiB0fkCVDeQpQ85nRmXbvX0zrIl80FW316eQ25yMc,373
3
+ fastled/app.py,sha256=UObQfgAcFSLXr_N04D4PSI15_p5CFz4bEj_MuBMHyKE,5859
4
+ fastled/args.py,sha256=chqZa6mRbqWBEvfs8vbw3Z3SQczk22_JcvDwv2vGZdY,3280
5
5
  fastled/cli.py,sha256=5EBsb02ueFUjlgrlg0GMdj3e5nnHVhvofmYyQRaw8uM,565
6
6
  fastled/cli_test.py,sha256=qJB9yLRFR3OwOwdIWSQ0fQsWLnA37v5pDccufiP_hTs,512
7
7
  fastled/cli_test_interactive.py,sha256=BjNhveZOk5aCffHbcrxPQQjWmAuj4ClVKKcKX5eY6yM,542
8
- fastled/client_server.py,sha256=falqUhGSHQpNfEXNCcQFPDAZymfncEVhIDcURBIJTFk,18390
8
+ fastled/client_server.py,sha256=uK-reqTN4umtVm8K3fcLo2Op_P_jFKVFtKFJRpBF1Xs,18598
9
9
  fastled/compile_server.py,sha256=rkXvrvdav5vDG8lv_OlBX3YSCHtnHMt25nXbfeg_r78,2960
10
10
  fastled/compile_server_impl.py,sha256=MIe-GvKenoDaqX8VhCJ7KNIWTOHHcLPgUQ7kO6lsa38,12199
11
- fastled/docker_manager.py,sha256=OWAWfKrtJQU6joXZF9bnoLmh8T8U3dGq-obqBuNVY_8,39260
11
+ fastled/docker_manager.py,sha256=aF4_XH_1FF7pW0CB1DKOwyVEf2PbejBmzDXOzthEnL8,39383
12
12
  fastled/filewatcher.py,sha256=3qS3L7zMQhFuVrkeGn1djsB_cB6x_E2YGJmmQWVAU_w,10033
13
13
  fastled/keyboard.py,sha256=UTAsqCn1UMYnB8YDzENiLTj4GeL45tYfEcO7_5fLFEg,3556
14
14
  fastled/keyz.py,sha256=LO-8m_7CpNDiZLM-FXhQ30f9gN1bUYz5lOsUPTIbI-c,4020
@@ -36,9 +36,9 @@ fastled/site/build.py,sha256=2YKU_UWKlJdGnjdbAbaL0co6kceFMSTVYwH1KCmgPZA,13987
36
36
  fastled/site/examples.py,sha256=s6vj2zJc6BfKlnbwXr1QWY1mzuDBMt6j5MEBOWjO_U8,155
37
37
  fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
38
38
  fastled/test/examples.py,sha256=GfaHeY1E8izBl6ZqDVjz--RHLyVR4NRnQ5pBesCFJFY,1673
39
- fastled-1.3.6.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
40
- fastled-1.3.6.dist-info/METADATA,sha256=ovogtrnJaVuIEeBvSWcCwu2-T8X0MsyWDN-96Prpvf0,30049
41
- fastled-1.3.6.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
42
- fastled-1.3.6.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
43
- fastled-1.3.6.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
44
- fastled-1.3.6.dist-info/RECORD,,
39
+ fastled-1.3.10.dist-info/licenses/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
40
+ fastled-1.3.10.dist-info/METADATA,sha256=EXXCG6ZWbD_tSmhsyDNMWx8_MXI20qZPaO9o09mWCKc,30050
41
+ fastled-1.3.10.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
42
+ fastled-1.3.10.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
43
+ fastled-1.3.10.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
44
+ fastled-1.3.10.dist-info/RECORD,,