cleepcli 1.49.5__tar.gz → 1.49.6__tar.gz
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.
- {cleepcli-1.49.5/cleepcli.egg-info → cleepcli-1.49.6}/PKG-INFO +1 -1
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/pico.py +20 -24
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/version.py +1 -1
- {cleepcli-1.49.5 → cleepcli-1.49.6/cleepcli.egg-info}/PKG-INFO +1 -1
- {cleepcli-1.49.5 → cleepcli-1.49.6}/LICENSE +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/MANIFEST.in +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/README.md +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/bin/ccli +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/bin/cleep-cli +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/__init__.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/check.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/ci.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/cleepapi.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/config.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/console.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/docs.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/file.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/git.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/module.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/package.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/systemd/cleep-watch.service +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/test.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/tools.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/watch.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/watchsvc.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli.egg-info/SOURCES.txt +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli.egg-info/dependency_links.txt +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli.egg-info/requires.txt +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli.egg-info/top_level.txt +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/pyproject.toml +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/requirements.txt +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/setup.cfg +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/setup.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_check.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_config.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_console.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_coverage.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_docs_breaking.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_file_sync_all.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_module_scaffold.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_pico.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_watch.py +0 -0
- {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_watchsvc.py +0 -0
|
@@ -59,7 +59,14 @@ class Pico:
|
|
|
59
59
|
)
|
|
60
60
|
self._emit("=== [%s/%s] %s ===" % (index, total, label))
|
|
61
61
|
|
|
62
|
-
def _run_streamed(
|
|
62
|
+
def _run_streamed(
|
|
63
|
+
self,
|
|
64
|
+
args: list[str] | str,
|
|
65
|
+
error_prefix: str | None = None,
|
|
66
|
+
shell: bool = False,
|
|
67
|
+
cwd: str | None = None,
|
|
68
|
+
env: dict[str, str] | None = None,
|
|
69
|
+
) -> None:
|
|
63
70
|
"""
|
|
64
71
|
Run a command and stream combined stdout/stderr line by line.
|
|
65
72
|
|
|
@@ -67,11 +74,15 @@ class Pico:
|
|
|
67
74
|
args: argv list, or shell command string when shell=True
|
|
68
75
|
error_prefix: message prefix on non-zero exit
|
|
69
76
|
shell: pass command through the shell
|
|
77
|
+
cwd: optional working directory
|
|
78
|
+
env: optional environment (defaults to a copy of os.environ)
|
|
70
79
|
"""
|
|
71
|
-
|
|
72
|
-
|
|
80
|
+
run_env = dict(env) if env is not None else os.environ.copy()
|
|
81
|
+
run_env.setdefault("GIT_TERMINAL_PROMPT", "0")
|
|
73
82
|
# Make apt less chatty about progress bars that redraw the same line.
|
|
74
|
-
|
|
83
|
+
run_env.setdefault("DEBIAN_FRONTEND", "noninteractive")
|
|
84
|
+
if isinstance(args, list):
|
|
85
|
+
self.logger.debug("$ %s", " ".join(args))
|
|
75
86
|
proc = subprocess.Popen(
|
|
76
87
|
args,
|
|
77
88
|
stdout=subprocess.PIPE,
|
|
@@ -79,14 +90,17 @@ class Pico:
|
|
|
79
90
|
text=True,
|
|
80
91
|
bufsize=1,
|
|
81
92
|
shell=shell,
|
|
82
|
-
|
|
93
|
+
cwd=cwd,
|
|
94
|
+
env=run_env,
|
|
83
95
|
)
|
|
84
96
|
assert proc.stdout is not None
|
|
85
97
|
for line in proc.stdout:
|
|
86
98
|
print(line, end="", flush=True)
|
|
87
99
|
returncode = proc.wait()
|
|
88
100
|
if returncode != 0:
|
|
89
|
-
|
|
101
|
+
prefix = error_prefix or "Command failed"
|
|
102
|
+
detail = args if isinstance(args, str) else " ".join(args)
|
|
103
|
+
raise PicoError("%s (exit %s): %s" % (prefix, returncode, detail))
|
|
90
104
|
|
|
91
105
|
def _toolchain_ok(self) -> bool:
|
|
92
106
|
return bool(shutil.which("cmake") and shutil.which("arm-none-eabi-gcc"))
|
|
@@ -360,24 +374,6 @@ class Pico:
|
|
|
360
374
|
candidates.sort(key=lambda path: os.path.getmtime(path), reverse=True)
|
|
361
375
|
return candidates[0]
|
|
362
376
|
|
|
363
|
-
def _run_streamed(self, args: list[str], cwd: str, env: dict[str, str]) -> None:
|
|
364
|
-
self.logger.info("$ %s", " ".join(args))
|
|
365
|
-
process = subprocess.Popen(
|
|
366
|
-
args,
|
|
367
|
-
cwd=cwd,
|
|
368
|
-
env=env,
|
|
369
|
-
stdout=subprocess.PIPE,
|
|
370
|
-
stderr=subprocess.STDOUT,
|
|
371
|
-
text=True,
|
|
372
|
-
bufsize=1,
|
|
373
|
-
)
|
|
374
|
-
assert process.stdout is not None
|
|
375
|
-
for line in process.stdout:
|
|
376
|
-
logging.info(line.rstrip("\n"))
|
|
377
|
-
returncode = process.wait()
|
|
378
|
-
if returncode != 0:
|
|
379
|
-
raise PicoError("Command failed (%s): %s" % (returncode, " ".join(args)))
|
|
380
|
-
|
|
381
377
|
def build_firmware(self, module_name: str, slug: str | None = None) -> dict[str, Any]:
|
|
382
378
|
"""
|
|
383
379
|
Compile UF2 firmwares for a module (all uf2 kinds, or one slug).
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|