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.
Files changed (43) hide show
  1. {cleepcli-1.49.5/cleepcli.egg-info → cleepcli-1.49.6}/PKG-INFO +1 -1
  2. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/pico.py +20 -24
  3. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/version.py +1 -1
  4. {cleepcli-1.49.5 → cleepcli-1.49.6/cleepcli.egg-info}/PKG-INFO +1 -1
  5. {cleepcli-1.49.5 → cleepcli-1.49.6}/LICENSE +0 -0
  6. {cleepcli-1.49.5 → cleepcli-1.49.6}/MANIFEST.in +0 -0
  7. {cleepcli-1.49.5 → cleepcli-1.49.6}/README.md +0 -0
  8. {cleepcli-1.49.5 → cleepcli-1.49.6}/bin/ccli +0 -0
  9. {cleepcli-1.49.5 → cleepcli-1.49.6}/bin/cleep-cli +0 -0
  10. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/__init__.py +0 -0
  11. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/check.py +0 -0
  12. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/ci.py +0 -0
  13. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/cleepapi.py +0 -0
  14. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/config.py +0 -0
  15. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/console.py +0 -0
  16. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/docs.py +0 -0
  17. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/file.py +0 -0
  18. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/git.py +0 -0
  19. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/module.py +0 -0
  20. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/package.py +0 -0
  21. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/systemd/cleep-watch.service +0 -0
  22. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/test.py +0 -0
  23. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/tools.py +0 -0
  24. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/watch.py +0 -0
  25. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli/watchsvc.py +0 -0
  26. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli.egg-info/SOURCES.txt +0 -0
  27. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli.egg-info/dependency_links.txt +0 -0
  28. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli.egg-info/requires.txt +0 -0
  29. {cleepcli-1.49.5 → cleepcli-1.49.6}/cleepcli.egg-info/top_level.txt +0 -0
  30. {cleepcli-1.49.5 → cleepcli-1.49.6}/pyproject.toml +0 -0
  31. {cleepcli-1.49.5 → cleepcli-1.49.6}/requirements.txt +0 -0
  32. {cleepcli-1.49.5 → cleepcli-1.49.6}/setup.cfg +0 -0
  33. {cleepcli-1.49.5 → cleepcli-1.49.6}/setup.py +0 -0
  34. {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_check.py +0 -0
  35. {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_config.py +0 -0
  36. {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_console.py +0 -0
  37. {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_coverage.py +0 -0
  38. {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_docs_breaking.py +0 -0
  39. {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_file_sync_all.py +0 -0
  40. {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_module_scaffold.py +0 -0
  41. {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_pico.py +0 -0
  42. {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_watch.py +0 -0
  43. {cleepcli-1.49.5 → cleepcli-1.49.6}/tests/test_watchsvc.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cleepcli
3
- Version: 1.49.5
3
+ Version: 1.49.6
4
4
  Summary: Cleep-cli helps developers to build great Cleep applications from command line.
5
5
  Home-page: https://github.com/CleepDevice/cleep-cli
6
6
  Author: Tanguy Bonneau
@@ -59,7 +59,14 @@ class Pico:
59
59
  )
60
60
  self._emit("=== [%s/%s] %s ===" % (index, total, label))
61
61
 
62
- def _run_streamed(self, args: list[str] | str, error_prefix: str, shell: bool = False) -> None:
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
- env = os.environ.copy()
72
- env["GIT_TERMINAL_PROMPT"] = "0"
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
- env.setdefault("DEBIAN_FRONTEND", "noninteractive")
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
- env=env,
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
- raise PicoError("%s (exit %s)" % (error_prefix, returncode))
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).
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env python
2
2
  # -*- coding: utf-8 -*-
3
3
 
4
- VERSION = "1.49.5"
4
+ VERSION = "1.49.6"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cleepcli
3
- Version: 1.49.5
3
+ Version: 1.49.6
4
4
  Summary: Cleep-cli helps developers to build great Cleep applications from command line.
5
5
  Home-page: https://github.com/CleepDevice/cleep-cli
6
6
  Author: Tanguy Bonneau
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