fastled 1.2.9__py3-none-any.whl → 1.2.11__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 +16 -1
- fastled/open_browser.py +18 -5
- {fastled-1.2.9.dist-info → fastled-1.2.11.dist-info}/METADATA +2 -1
- {fastled-1.2.9.dist-info → fastled-1.2.11.dist-info}/RECORD +8 -8
- {fastled-1.2.9.dist-info → fastled-1.2.11.dist-info}/LICENSE +0 -0
- {fastled-1.2.9.dist-info → fastled-1.2.11.dist-info}/WHEEL +0 -0
- {fastled-1.2.9.dist-info → fastled-1.2.11.dist-info}/entry_points.txt +0 -0
- {fastled-1.2.9.dist-info → fastled-1.2.11.dist-info}/top_level.txt +0 -0
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.
|
17
|
+
__version__ = "1.2.11"
|
18
18
|
|
19
19
|
|
20
20
|
class Api:
|
@@ -313,6 +313,21 @@ class Test:
|
|
313
313
|
"""Builds the FastLED compiler site."""
|
314
314
|
build(outputdir=outputdir, fast=fast, check=check)
|
315
315
|
|
316
|
+
@staticmethod
|
317
|
+
def spawn_http_server(
|
318
|
+
directory: Path | str = Path("."),
|
319
|
+
port: int = 8000,
|
320
|
+
open_browser: bool = True,
|
321
|
+
) -> subprocess.Popen:
|
322
|
+
from fastled.open_browser import open_http_server
|
323
|
+
|
324
|
+
if isinstance(directory, str):
|
325
|
+
directory = Path(directory)
|
326
|
+
proc: subprocess.Popen = open_http_server(
|
327
|
+
directory, port=port, open_browser=open_browser
|
328
|
+
)
|
329
|
+
return proc
|
330
|
+
|
316
331
|
|
317
332
|
__all__ = [
|
318
333
|
"Api",
|
fastled/open_browser.py
CHANGED
@@ -8,15 +8,28 @@ from pathlib import Path
|
|
8
8
|
DEFAULT_PORT = 8081
|
9
9
|
|
10
10
|
|
11
|
-
def
|
11
|
+
def open_http_server(
|
12
|
+
fastled_js: Path, port: int | None = None, open_browser=True
|
13
|
+
) -> subprocess.Popen:
|
12
14
|
"""Start livereload server in the fastled_js directory using API"""
|
15
|
+
cmd_list: list[str]
|
13
16
|
print(f"\nStarting livereload server in {fastled_js}")
|
14
17
|
if shutil.which("live-server") is None:
|
15
18
|
print("live-server not found. Installing it with the embedded npm...")
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
19
|
+
cmd_list = [sys.executable, "-m", "npm", "install", "-g", "live-server"]
|
20
|
+
subprocess.run(cmd_list)
|
21
|
+
cmd_list = ["live-server"]
|
22
|
+
if port is not None:
|
23
|
+
cmd_list.extend([f"--port={port}"])
|
24
|
+
if not open_browser:
|
25
|
+
cmd_list.append("--no-browser")
|
26
|
+
# subprocess.run(["cd", str(fastled_js), "&&"] + cmd_list)
|
27
|
+
return subprocess.Popen(cmd_list, cwd=str(fastled_js), shell=True)
|
28
|
+
|
29
|
+
|
30
|
+
def _open_browser_python(fastled_js: Path) -> None:
|
31
|
+
"""Start livereload server in the fastled_js directory using API"""
|
32
|
+
proc = open_http_server(fastled_js)
|
20
33
|
proc.wait()
|
21
34
|
|
22
35
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fastled
|
3
|
-
Version: 1.2.
|
3
|
+
Version: 1.2.11
|
4
4
|
Summary: FastLED Wasm Compiler
|
5
5
|
Home-page: https://github.com/zackees/fastled-wasm
|
6
6
|
Maintainer: Zachary Vorhies
|
@@ -274,6 +274,7 @@ A: A big chunk of space is being used by unnecessary javascript `emscripten` bun
|
|
274
274
|
|
275
275
|
# Revisions
|
276
276
|
|
277
|
+
* 1.2.10 - `fastled.Test` now allows you to spawn the http webserver on a folder with an index.html in it.
|
277
278
|
* 1.2.7 - A bunch of fixes for MacOS and probably linux.
|
278
279
|
* 1.2.6 - Now builds image from the project root of FastLED.
|
279
280
|
* 1.1.25 - Fix up paths for `--init`
|
@@ -1,4 +1,4 @@
|
|
1
|
-
fastled/__init__.py,sha256=
|
1
|
+
fastled/__init__.py,sha256=n_6k2u1TLsYFc6Ke6DHb00-R_WeXIglYeN7qwWGvy8c,10717
|
2
2
|
fastled/app.py,sha256=4LQHjN-GMAzhEaIKSFkT5S26Snb1Y9kgVnPK6kqXbrQ,3382
|
3
3
|
fastled/cli.py,sha256=FjVr31ht0UPlAcmX-84NwfAGMQHTkrCe4o744jCAxiw,375
|
4
4
|
fastled/client_server.py,sha256=8L62zNtkGtErDtWrr4XVNsv7ji2zoS5rlqfCnwI3VKU,13177
|
@@ -8,7 +8,7 @@ fastled/docker_manager.py,sha256=Nf0x2BpwT1BvSsi63ZkDhQDMhjiWrjFiXxgowtQMrhM,289
|
|
8
8
|
fastled/filewatcher.py,sha256=LwEQJkqADsArZyY499RLAer6JjJyDwaQBcAvT7xmp3c,6708
|
9
9
|
fastled/keyboard.py,sha256=vyYxE98WCXjvMpcUJd0YXPVvt7TzvBmifLYI-K7jtKg,3524
|
10
10
|
fastled/live_client.py,sha256=b9mVJ-8w_zoEDwKIlAEUC5Q1La5W5rR6ct-exOcgJec,2561
|
11
|
-
fastled/open_browser.py,sha256=
|
11
|
+
fastled/open_browser.py,sha256=9H1eA47FUFyozjGfwLJsiuEUsuP9sPXH_3egb89g_BA,2026
|
12
12
|
fastled/parse_args.py,sha256=LD2PpSEhyq3ZqPWa_TJ90Fb-O-yldi7rnen2fWLOPjo,6868
|
13
13
|
fastled/paths.py,sha256=VsPmgu0lNSCFOoEC0BsTYzDygXqy15AHUfN-tTuzDZA,99
|
14
14
|
fastled/project_init.py,sha256=bBt4DwmW5hZkm9ICt9Qk-0Nr_0JQM7icCgH5Iv-bCQs,3984
|
@@ -24,9 +24,9 @@ fastled/assets/example.txt,sha256=lTBovRjiz0_TgtAtbA1C5hNi2ffbqnNPqkKg6UiKCT8,54
|
|
24
24
|
fastled/site/build.py,sha256=Eq_u3oRxP88twv5IskKfH3tMr6IuT3I5C5zl94TUECw,13854
|
25
25
|
fastled/test/can_run_local_docker_tests.py,sha256=LEuUbHctRhNNFWcvnz2kEGmjDJeXO4c3kNpizm3yVJs,400
|
26
26
|
fastled/test/examples.py,sha256=6xPwx_k9_XwYTpI1nk4SrYbsJKHJACd30GzD1epGqhY,1597
|
27
|
-
fastled-1.2.
|
28
|
-
fastled-1.2.
|
29
|
-
fastled-1.2.
|
30
|
-
fastled-1.2.
|
31
|
-
fastled-1.2.
|
32
|
-
fastled-1.2.
|
27
|
+
fastled-1.2.11.dist-info/LICENSE,sha256=b6pOoifSXiUaz_lDS84vWlG3fr4yUKwB8fzkrH9R8bQ,1064
|
28
|
+
fastled-1.2.11.dist-info/METADATA,sha256=AudnTCOBm01DCojEpMqBTYulE_I9G0eo2R4uX3uPYKQ,20192
|
29
|
+
fastled-1.2.11.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
30
|
+
fastled-1.2.11.dist-info/entry_points.txt,sha256=RCwmzCSOS4-C2i9EziANq7Z2Zb4KFnEMR1FQC0bBwAw,101
|
31
|
+
fastled-1.2.11.dist-info/top_level.txt,sha256=Bbv5kpJpZhWNCvDF4K0VcvtBSDMa8B7PTOrZa9CezHY,8
|
32
|
+
fastled-1.2.11.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|