mpbuild 1.2.0__tar.gz → 1.3.0__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 (36) hide show
  1. {mpbuild-1.2.0 → mpbuild-1.3.0}/PKG-INFO +6 -2
  2. {mpbuild-1.2.0 → mpbuild-1.3.0}/README.md +4 -0
  3. {mpbuild-1.2.0 → mpbuild-1.3.0}/pyproject.toml +1 -1
  4. {mpbuild-1.2.0 → mpbuild-1.3.0}/src/mpbuild/build.py +8 -12
  5. {mpbuild-1.2.0 → mpbuild-1.3.0}/tests/test_build_container.py +16 -23
  6. {mpbuild-1.2.0 → mpbuild-1.3.0}/tests/test_docker_build_cmd.py +1 -1
  7. {mpbuild-1.2.0 → mpbuild-1.3.0}/uv.lock +1 -1
  8. {mpbuild-1.2.0 → mpbuild-1.3.0}/.github/workflows/release.yml +0 -0
  9. {mpbuild-1.2.0 → mpbuild-1.3.0}/.github/workflows/test.yml +0 -0
  10. {mpbuild-1.2.0 → mpbuild-1.3.0}/.gitignore +0 -0
  11. {mpbuild-1.2.0 → mpbuild-1.3.0}/.pre-commit-config.yaml +0 -0
  12. {mpbuild-1.2.0 → mpbuild-1.3.0}/.python-version +0 -0
  13. {mpbuild-1.2.0 → mpbuild-1.3.0}/LICENSE +0 -0
  14. {mpbuild-1.2.0 → mpbuild-1.3.0}/RELEASE.md +0 -0
  15. {mpbuild-1.2.0 → mpbuild-1.3.0}/docs/mpbuild_interactive_screenshot.png +0 -0
  16. {mpbuild-1.2.0 → mpbuild-1.3.0}/requirements-dev.lock +0 -0
  17. {mpbuild-1.2.0 → mpbuild-1.3.0}/requirements.lock +0 -0
  18. {mpbuild-1.2.0 → mpbuild-1.3.0}/src/mpbuild/__init__.py +0 -0
  19. {mpbuild-1.2.0 → mpbuild-1.3.0}/src/mpbuild/__main__.py +0 -0
  20. {mpbuild-1.2.0 → mpbuild-1.3.0}/src/mpbuild/board_database.py +0 -0
  21. {mpbuild-1.2.0 → mpbuild-1.3.0}/src/mpbuild/check_images.py +0 -0
  22. {mpbuild-1.2.0 → mpbuild-1.3.0}/src/mpbuild/cli.py +0 -0
  23. {mpbuild-1.2.0 → mpbuild-1.3.0}/src/mpbuild/completions.py +0 -0
  24. {mpbuild-1.2.0 → mpbuild-1.3.0}/src/mpbuild/find_boards.py +0 -0
  25. {mpbuild-1.2.0 → mpbuild-1.3.0}/src/mpbuild/interactive.py +0 -0
  26. {mpbuild-1.2.0 → mpbuild-1.3.0}/src/mpbuild/interactive.tcss +0 -0
  27. {mpbuild-1.2.0 → mpbuild-1.3.0}/src/mpbuild/list_boards.py +0 -0
  28. {mpbuild-1.2.0 → mpbuild-1.3.0}/src/mpbuild/py.typed +0 -0
  29. {mpbuild-1.2.0 → mpbuild-1.3.0}/tests/__init__.py +0 -0
  30. {mpbuild-1.2.0 → mpbuild-1.3.0}/tests/conftest.py +0 -0
  31. {mpbuild-1.2.0 → mpbuild-1.3.0}/tests/test_board_database.py +0 -0
  32. {mpbuild-1.2.0 → mpbuild-1.3.0}/tests/test_cli.py +0 -0
  33. {mpbuild-1.2.0 → mpbuild-1.3.0}/tests/test_detect_idf_version.py +0 -0
  34. {mpbuild-1.2.0 → mpbuild-1.3.0}/tests/test_find_boards.py +0 -0
  35. {mpbuild-1.2.0 → mpbuild-1.3.0}/tests/test_interactive.py +0 -0
  36. {mpbuild-1.2.0 → mpbuild-1.3.0}/tests/test_worktrees.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: mpbuild
3
- Version: 1.2.0
3
+ Version: 1.3.0
4
4
  Summary: Build MicroPython firmware with ease!
5
5
  Author-email: Matt Trentini <matt.trentini@gmail.com>
6
6
  License-File: LICENSE
@@ -50,6 +50,10 @@ Build a board, with optional variant:
50
50
  mpbuild build BOARD [VARIANT]
51
51
  ```
52
52
 
53
+ The shared ARM build image is `micropython/build-micropython-arm:trixie`.
54
+ This includes `ALIF_ENSEMBLE` and ARM variants of Raspberry Pi boards. The
55
+ RP2350 `RISCV` variant keeps its dedicated image, and WebAssembly stays on Bookworm.
56
+
53
57
  Remove build artifacts:
54
58
 
55
59
  ```bash
@@ -38,6 +38,10 @@ Build a board, with optional variant:
38
38
  mpbuild build BOARD [VARIANT]
39
39
  ```
40
40
 
41
+ The shared ARM build image is `micropython/build-micropython-arm:trixie`.
42
+ This includes `ALIF_ENSEMBLE` and ARM variants of Raspberry Pi boards. The
43
+ RP2350 `RISCV` variant keeps its dedicated image, and WebAssembly stays on Bookworm.
44
+
41
45
  Remove build artifacts:
42
46
 
43
47
  ```bash
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mpbuild"
3
- version = "1.2.0"
3
+ version = "1.3.0"
4
4
  description = "Build MicroPython firmware with ease!"
5
5
  authors = [
6
6
  { name = "Matt Trentini", email = "matt.trentini@gmail.com" }
@@ -65,7 +65,7 @@ def get_main_git_directory(mpy_dir: Path) -> Path | None:
65
65
  return None
66
66
 
67
67
 
68
- ARM_BUILD_CONTAINER = "micropython/build-micropython-arm"
68
+ ARM_BUILD_CONTAINER = "micropython/build-micropython-arm:trixie"
69
69
  WIN_BUILD_CONTAINER = "micropython/build-micropython-win-mingw:latest"
70
70
  ESP_IDF_CONTAINER = "espressif/idf"
71
71
  ESP_IDF_FALLBACK_VERSION = "v5.4.2"
@@ -76,12 +76,13 @@ BUILD_CONTAINERS = {
76
76
  "mimxrt": ARM_BUILD_CONTAINER,
77
77
  "renesas-ra": ARM_BUILD_CONTAINER,
78
78
  "samd": ARM_BUILD_CONTAINER,
79
+ "alif": ARM_BUILD_CONTAINER,
79
80
  "psoc6": "ifxmakers/mpy-mtb-ci",
80
81
  "psoc-edge": "micropython/build-micropython-psoc-edge", # arm-none-eabi + edgeprotecttools
81
82
  "esp32": f"{ESP_IDF_CONTAINER}:{ESP_IDF_FALLBACK_VERSION}",
82
83
  "esp8266": "larsks/esp-open-sdk",
83
84
  "unix": "gcc:12-bookworm", # Special, doesn't have boards
84
- "webassembly": ARM_BUILD_CONTAINER, # installs emsdk on first build
85
+ "webassembly": "micropython/build-micropython-arm:bookworm", # installs emsdk on first build
85
86
  "windows": WIN_BUILD_CONTAINER, # cross compile linux to windows
86
87
  "baochip": "micropython/build-micropython-baochip", # xPack RISC-V + pure25519
87
88
  }
@@ -193,20 +194,15 @@ def get_build_container(board: Board, variant: str | None = None) -> str:
193
194
  2. CI workflow (``IDF_NEWEST_VER`` in ``.github/workflows/ports_esp32.yml``)
194
195
  3. Hardcoded fallback version
195
196
 
196
- Example: board="RPI_PICO" => "micropython/build-micropython-arm"
197
- Example: board="RPI_PICO", variant="RISCV" => "micropython/build-micropython-rp2350riscv"
197
+ Example: board="RPI_PICO" => "micropython/build-micropython-arm:trixie"
198
+ Example: board="RPI_PICO2", variant="RISCV" => "micropython/build-micropython-rp2350riscv"
198
199
  Example: board="ESP32_GENERIC" => "espressif/idf:v5.5.1" (auto-detected)
199
200
  """
200
201
  port = board.port
201
202
 
202
- if port.name == "rp2":
203
- if variant == "RISCV":
204
- # Special case: This board supports an ARM core as default
205
- # and a RISC-V core as a variant
206
- return "micropython/build-micropython-rp2350riscv"
207
-
208
- # RP2 requires a recent version of gcc
209
- return "micropython/build-micropython-arm:bookworm"
203
+ if port.name == "rp2" and variant == "RISCV":
204
+ # RP2350 supports a RISC-V core as an alternative to its default ARM core.
205
+ return "micropython/build-micropython-rp2350riscv"
210
206
 
211
207
  if port.name == "esp32":
212
208
  idf_version = detect_idf_version(port.directory_repo, board.mcu)
@@ -6,7 +6,6 @@ import pytest
6
6
 
7
7
  from mpbuild.board_database import Database
8
8
  from mpbuild.build import (
9
- ARM_BUILD_CONTAINER,
10
9
  ESP_IDF_CONTAINER,
11
10
  ESP_IDF_FALLBACK_VERSION,
12
11
  WIN_BUILD_CONTAINER,
@@ -25,6 +24,8 @@ target: esp32
25
24
  version: 2.0.0
26
25
  """
27
26
 
27
+ EXPECTED_ARM_IMAGE = "micropython/build-micropython-arm:trixie"
28
+
28
29
 
29
30
  # ===================================================================
30
31
  # Simple ports: direct lookup in BUILD_CONTAINERS
@@ -33,11 +34,12 @@ class TestSimplePorts:
33
34
  @pytest.mark.parametrize(
34
35
  "port_name, expected",
35
36
  [
36
- ("stm32", ARM_BUILD_CONTAINER),
37
- ("nrf", ARM_BUILD_CONTAINER),
38
- ("mimxrt", ARM_BUILD_CONTAINER),
39
- ("renesas-ra", ARM_BUILD_CONTAINER),
40
- ("samd", ARM_BUILD_CONTAINER),
37
+ ("stm32", EXPECTED_ARM_IMAGE),
38
+ ("nrf", EXPECTED_ARM_IMAGE),
39
+ ("mimxrt", EXPECTED_ARM_IMAGE),
40
+ ("renesas-ra", EXPECTED_ARM_IMAGE),
41
+ ("samd", EXPECTED_ARM_IMAGE),
42
+ ("alif", EXPECTED_ARM_IMAGE),
41
43
  ("psoc6", "ifxmakers/mpy-mtb-ci"),
42
44
  ("psoc-edge", "micropython/build-micropython-psoc-edge"),
43
45
  ("esp8266", "larsks/esp-open-sdk"),
@@ -56,10 +58,9 @@ class TestSimplePorts:
56
58
  assert get_build_container(db.boards["unix"]) == "gcc:12-bookworm"
57
59
 
58
60
  def test_webassembly_special_port(self, mpy_root):
59
- """The 'webassembly' special port reuses the ARM build container; emsdk
60
- is installed at build time via tools/ci.sh."""
61
- db = Database(mpy_root)
62
- assert get_build_container(db.boards["webassembly"]) == ARM_BUILD_CONTAINER
61
+ """WebAssembly keeps the Bookworm image for its emsdk build."""
62
+ board = Database(mpy_root).boards["webassembly"]
63
+ assert get_build_container(board) == "micropython/build-micropython-arm:bookworm"
63
64
 
64
65
  def test_windows_special_port(self, mpy_root):
65
66
  """The 'windows' special port resolves to the MinGW cross-compile container."""
@@ -78,17 +79,13 @@ class TestSimplePorts:
78
79
 
79
80
 
80
81
  # ===================================================================
81
- # rp2 — has its own resolution path (default + RISCV variant)
82
+ # rp2 — shared ARM default with a RISC-V override
82
83
  # ===================================================================
83
84
  class TestRp2:
84
- def test_default_returns_arm_bookworm(self, mpy_root, make_board):
85
- """rp2 needs a recent gcc; default resolves to the arm:bookworm image."""
85
+ def test_default_returns_arm_trixie(self, mpy_root, make_board):
86
86
  make_board("rp2", "RPI_PICO", mcu="rp2040")
87
87
  db = Database(mpy_root)
88
- assert (
89
- get_build_container(db.boards["RPI_PICO"])
90
- == "micropython/build-micropython-arm:bookworm"
91
- )
88
+ assert get_build_container(db.boards["RPI_PICO"]) == EXPECTED_ARM_IMAGE
92
89
 
93
90
  def test_riscv_variant_uses_dedicated_image(self, mpy_root, make_board):
94
91
  """The RISCV variant (rp2350) uses its own dedicated container."""
@@ -105,18 +102,14 @@ class TestRp2:
105
102
  )
106
103
 
107
104
  def test_non_riscv_variant_uses_default(self, mpy_root, make_board):
108
- """Other rp2 variants still get the regular arm:bookworm container."""
109
105
  make_board(
110
106
  "rp2",
111
107
  "WEACTSTUDIO",
112
108
  mcu="rp2040",
113
109
  variants={"FLASH_2M": "2 MB flash"},
114
110
  )
115
- db = Database(mpy_root)
116
- assert (
117
- get_build_container(db.boards["WEACTSTUDIO"], variant="FLASH_2M")
118
- == "micropython/build-micropython-arm:bookworm"
119
- )
111
+ board = Database(mpy_root).boards["WEACTSTUDIO"]
112
+ assert get_build_container(board, variant="FLASH_2M") == EXPECTED_ARM_IMAGE
120
113
 
121
114
 
122
115
  # ===================================================================
@@ -34,7 +34,7 @@ class TestDockerBuildCmdBasics:
34
34
 
35
35
  assert cmd.startswith("docker run --rm ")
36
36
  assert f"-v {mpy_root}:{mpy_root} -w {mpy_root}" in cmd
37
- assert "micropython/build-micropython-arm" in cmd
37
+ assert " micropython/build-micropython-arm:trixie " in cmd
38
38
  assert "bash -c " in cmd
39
39
  assert "make -C mpy-cross && " in cmd
40
40
  assert "make -C ports/stm32 BOARD=PYBV11 submodules && " in cmd
@@ -204,7 +204,7 @@ wheels = [
204
204
 
205
205
  [[package]]
206
206
  name = "mpbuild"
207
- version = "1.2.0"
207
+ version = "1.3.0"
208
208
  source = { editable = "." }
209
209
  dependencies = [
210
210
  { name = "rich" },
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