mpflash 0.8.2__tar.gz → 0.8.3__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 (46) hide show
  1. {mpflash-0.8.2 → mpflash-0.8.3}/PKG-INFO +1 -1
  2. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/downloaded.py +7 -3
  3. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/flash_uf2_boardid.py +2 -1
  4. {mpflash-0.8.2 → mpflash-0.8.3}/pyproject.toml +1 -1
  5. {mpflash-0.8.2 → mpflash-0.8.3}/LICENSE +0 -0
  6. {mpflash-0.8.2 → mpflash-0.8.3}/README.md +0 -0
  7. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/__init__.py +0 -0
  8. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/add_firmware.py +0 -0
  9. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/ask_input.py +0 -0
  10. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/cli_download.py +0 -0
  11. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/cli_flash.py +0 -0
  12. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/cli_group.py +0 -0
  13. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/cli_list.py +0 -0
  14. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/cli_main.py +0 -0
  15. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/common.py +0 -0
  16. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/config.py +0 -0
  17. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/connected.py +0 -0
  18. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/download.py +0 -0
  19. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/errors.py +0 -0
  20. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/flash.py +0 -0
  21. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/flash_esp.py +0 -0
  22. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/flash_stm32.py +0 -0
  23. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/flash_stm32_cube.py +0 -0
  24. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/flash_stm32_dfu.py +0 -0
  25. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/flash_uf2.py +0 -0
  26. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/flash_uf2_linux.py +0 -0
  27. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/flash_uf2_macos.py +0 -0
  28. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/flash_uf2_windows.py +0 -0
  29. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/list.py +0 -0
  30. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/logger.py +0 -0
  31. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/mpboard_id/__init__.py +0 -0
  32. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/mpboard_id/add_boards.py +0 -0
  33. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/mpboard_id/board.py +0 -0
  34. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/mpboard_id/board_id.py +0 -0
  35. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/mpboard_id/board_info.zip +0 -0
  36. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/mpboard_id/store.py +0 -0
  37. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/mpremoteboard/__init__.py +0 -0
  38. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/mpremoteboard/mpy_fw_info.py +0 -0
  39. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/mpremoteboard/runner.py +0 -0
  40. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/uf2disk.py +0 -0
  41. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/vendor/basicgit.py +0 -0
  42. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/vendor/dfu.py +0 -0
  43. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/vendor/pydfu.py +0 -0
  44. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/vendor/readme.md +0 -0
  45. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/vendor/versions.py +0 -0
  46. {mpflash-0.8.2 → mpflash-0.8.3}/mpflash/worklist.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: mpflash
3
- Version: 0.8.2
3
+ Version: 0.8.3
4
4
  Summary: Flash and download tool for MicroPython firmwares
5
5
  Home-page: https://github.com/Josverl/micropython-stubber/blob/main/src/mpflash/README.md
6
6
  License: MIT
@@ -39,6 +39,7 @@ def clean_downloaded_firmwares(fw_folder: Path) -> None:
39
39
  writer.write(fw.to_dict())
40
40
  log.info(f"Removed duplicate entries from firmware.jsonl in {fw_folder}")
41
41
 
42
+
42
43
  def find_downloaded_firmware(
43
44
  *,
44
45
  board_id: str,
@@ -53,6 +54,7 @@ def find_downloaded_firmware(
53
54
  selector = {}
54
55
  fw_folder = fw_folder or config.firmware_folder
55
56
  # Use the information in firmwares.jsonl to find the firmware file
57
+ log.debug(f"{trie}] Looking for firmware for {board_id} {version} ")
56
58
  fw_list = downloaded_firmwares(fw_folder)
57
59
  if not fw_list:
58
60
  log.error("No firmware files found. Please download the firmware first.")
@@ -102,12 +104,13 @@ def filter_downloaded_fwlist(
102
104
  fw_list = [fw for fw in fw_list if fw.preview]
103
105
  else:
104
106
  # FWInfo version has no v1.2.3 prefix
105
- _version = clean_version(version, drop_v=True)
106
- fw_list = [fw for fw in fw_list if fw.version == _version]
107
-
107
+ _version = {clean_version(version, drop_v=True), clean_version(version, drop_v=False)}
108
+ fw_list = [fw for fw in fw_list if fw.version in _version]
109
+ log.trace(f"Filtering firmware for {version} : {len(fw_list)} found.")
108
110
  # filter by port
109
111
  if port:
110
112
  fw_list = [fw for fw in fw_list if fw.port == port]
113
+ log.trace(f"Filtering firmware for {port} : {len(fw_list)} found.")
111
114
 
112
115
  if board_id:
113
116
  if variants:
@@ -116,6 +119,7 @@ def filter_downloaded_fwlist(
116
119
  else:
117
120
  # the firmware variant should match exactly the board_id
118
121
  fw_list = [fw for fw in fw_list if fw.variant == board_id]
122
+ log.trace(f"Filtering firmware for {board_id} : {len(fw_list)} found.")
119
123
  if selector and port in selector:
120
124
  fw_list = [fw for fw in fw_list if fw.filename.endswith(selector[port])]
121
125
  return fw_list
@@ -1,4 +1,5 @@
1
1
  from pathlib import Path
2
+
2
3
  from loguru import logger as log
3
4
 
4
5
 
@@ -10,5 +11,5 @@ def get_board_id(path: Path):
10
11
  for line in data:
11
12
  if line.startswith("Board-ID"):
12
13
  board_id = line[9:].strip()
13
- log.trace(f"Found Board-ID={board_id}")
14
+ log.debug(f"INFO_UF2.TXT Board-ID={board_id}")
14
15
  return board_id
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "mpflash"
3
- version = "0.8.2"
3
+ version = "0.8.3"
4
4
  description = "Flash and download tool for MicroPython firmwares"
5
5
  authors = ["Jos Verlinde <jos_verlinde@hotmail.com>"]
6
6
  license = "MIT"
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