gha-utils 4.16.7__py3-none-any.whl → 4.17.0__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.

Potentially problematic release.


This version of gha-utils might be problematic. Click here for more details.

gha_utils/__init__.py CHANGED
@@ -17,4 +17,4 @@
17
17
 
18
18
  from __future__ import annotations
19
19
 
20
- __version__ = "4.16.7"
20
+ __version__ = "4.17.0"
gha_utils/cli.py CHANGED
@@ -18,6 +18,7 @@ from __future__ import annotations
18
18
 
19
19
  import logging
20
20
  import os
21
+ import re
21
22
  import sys
22
23
  from collections import Counter
23
24
  from datetime import datetime
@@ -43,7 +44,7 @@ from extra_platforms import ALL_IDS, is_github_ci
43
44
  from . import __version__
44
45
  from .changelog import Changelog
45
46
  from .mailmap import Mailmap
46
- from .metadata import Dialects, Metadata
47
+ from .metadata import NUITKA_BUILD_TARGETS, Dialects, Metadata
47
48
  from .test_plan import DEFAULT_TEST_PLAN, SkippedTest, parse_test_plan
48
49
 
49
50
 
@@ -105,6 +106,14 @@ def gha_utils():
105
106
 
106
107
 
107
108
  @gha_utils.command(short_help="Output project metadata")
109
+ @option(
110
+ "-u",
111
+ "--unstable-targets",
112
+ help="Build targets for which Nuitka is allowed to fail without comprimising the "
113
+ " release workflow. This option accepts a mangled string with multiple targets "
114
+ "separated by arbitrary separators. Recognized targets are: "
115
+ f"{', '.join(NUITKA_BUILD_TARGETS)}.",
116
+ )
108
117
  @option(
109
118
  "--format",
110
119
  type=Choice(tuple(item.value for item in Dialects), case_sensitive=False),
@@ -125,7 +134,7 @@ def gha_utils():
125
134
  default="-",
126
135
  )
127
136
  @pass_context
128
- def metadata(ctx, format, overwrite, output_path):
137
+ def metadata(ctx, unstable_targets, format, overwrite, output_path):
129
138
  """Dump project metadata to a file.
130
139
 
131
140
  By default the metadata produced are displayed directly to the console output.
@@ -153,7 +162,23 @@ def metadata(ctx, format, overwrite, output_path):
153
162
  logging.critical(msg)
154
163
  ctx.exit(2)
155
164
 
156
- metadata = Metadata()
165
+ # Extract targets from the raw string provided by the user.
166
+ valid_targets = set()
167
+ if unstable_targets:
168
+ for target in re.split("[^a-z0-9\-]", unstable_targets.lower()):
169
+ if target:
170
+ if target not in NUITKA_BUILD_TARGETS:
171
+ logging.fatal(
172
+ f"Unrecognized {target!r} target. "
173
+ f"Must be one of {', '.join(NUITKA_BUILD_TARGETS)}."
174
+ )
175
+ sys.exit(1)
176
+ valid_targets.add(target)
177
+ logging.debug(
178
+ f"Parsed {unstable_targets!r} string into {valid_targets} targets."
179
+ )
180
+
181
+ metadata = Metadata(valid_targets)
157
182
 
158
183
  # Output a warning in GitHub runners if metadata are not saved to $GITHUB_OUTPUT.
159
184
  if is_github_ci():
gha_utils/metadata.py CHANGED
@@ -46,108 +46,100 @@ release_commits_matrix={'commit': ['6f27db47612aaee06fdf08744b09a9f5f6c2'],
46
46
  'include': [{'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
47
47
  'short_sha': '6f27db4',
48
48
  'current_version': '2.0.0'}]}
49
- nuitka_matrix={'entry_point': ['mpm'],
49
+ nuitka_matrix={'os': ['ubuntu-24.04-arm', 'ubuntu-24.04', 'macos-15', 'macos-13', 'windows-11-arm', 'windows-2025'],
50
+ 'entry_point': ['mpm'],
50
51
  'commit': ['346ce664f055fbd042a25ee0b7e96702e95',
51
52
  '6f27db47612aaee06fdf08744b09a9f5f6c2'],
52
- 'os': ['ubuntu-24.04-arm', 'ubuntu-24.04', 'macos-15', 'macos-13', 'windows-11-arm', 'windows-2025'],
53
- 'include': [{'entry_point': 'mpm',
54
- 'cli_id': 'mpm',
55
- 'module_id': 'meta_package_manager.__main__',
56
- 'callable_id': 'main',
57
- 'module_path': 'meta_package_manager/__main__.py'},
58
- {'commit': '346ce664f055fbd042a25ee0b7e96702e95',
59
- 'short_sha': '346ce66',
60
- 'current_version': '2.0.0'},
61
- {'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
62
- 'short_sha': '6f27db4',
63
- 'current_version': '1.9.1'},
64
- {'os': 'ubuntu-24.04-arm',
65
- 'platform_id': 'linux',
66
- 'arch': 'arm64',
67
- 'extension': 'bin'},
68
- {'os': 'ubuntu-24.04',
69
- 'platform_id': 'linux',
70
- 'arch': 'x64',
71
- 'extension': 'bin'},
72
- {'os': 'macos-15',
73
- 'platform_id': 'macos',
74
- 'arch': 'arm64',
75
- 'extension': 'bin'},
76
- {'os': 'macos-13',
77
- 'platform_id': 'macos',
78
- 'arch': 'x64',
79
- 'extension': 'bin'},
80
- {'os': 'windows-11-arm',
81
- 'platform_id": 'windows',
82
- 'arch": 'arm64',
83
- 'extension": 'exe'},
84
- {'os': 'windows-2025',
85
- 'platform_id': 'windows',
86
- 'arch': 'x64',
87
- 'extension': 'exe'},
88
- {'entry_point': 'mpm',
89
- 'commit': '346ce664f055fbd042a25ee0b7e96702e95',
90
- 'os': 'ubuntu-24.04-arm',
91
- 'arch': 'arm64',
92
- 'bin_name': 'mpm-linux-arm64-build-346ce66.bin'},
93
- {'entry_point': 'mpm',
94
- 'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
95
- 'os': 'ubuntu-24.04-arm',
96
- 'arch': 'arm64',
97
- 'bin_name': 'mpm-linux-arm64-build-6f27db4.bin'},
98
- {'entry_point': 'mpm',
99
- 'commit': '346ce664f055fbd042a25ee0b7e96702e95',
100
- 'os': 'ubuntu-24.04',
101
- 'arch': 'x64',
102
- 'bin_name': 'mpm-linux-x64-build-346ce66.bin'},
103
- {'entry_point': 'mpm',
104
- 'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
105
- 'os': 'ubuntu-24.04',
106
- 'arch': 'x64',
107
- 'bin_name': 'mpm-linux-x64-build-6f27db4.bin'},
108
- {'entry_point': 'mpm',
109
- 'commit': '346ce664f055fbd042a25ee0b7e96702e95',
110
- 'os': 'macos-15',
111
- 'arch': 'arm64',
112
- 'bin_name': 'mpm-macos-arm64-build-346ce66.bin'},
113
- {'entry_point': 'mpm',
114
- 'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
115
- 'os': 'macos-15',
116
- 'arch': 'arm64',
117
- 'bin_name': 'mpm-macos-arm64-build-6f27db4.bin'},
118
- {'entry_point': 'mpm',
119
- 'commit': '346ce664f055fbd042a25ee0b7e96702e95',
120
- 'os': 'macos-13',
121
- 'arch': 'x64',
122
- 'bin_name': 'mpm-macos-x64-build-346ce66.bin'},
123
- {'entry_point': 'mpm',
124
- 'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
125
- 'os': 'macos-13',
126
- 'arch': 'x64',
127
- 'bin_name': 'mpm-macos-x64-build-6f27db4.bin'},
128
- {'entry_point': 'mpm',
129
- 'commit': '346ce664f055fbd042a25ee0b7e96702e95',
130
- 'os': 'windows-11-arm',
131
- 'arch': 'arm64',
132
- 'bin_name': 'mpm-windows-arm64-build-346ce66.bin'},
133
- {'entry_point': 'mpm',
134
- 'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
135
- 'os': 'windows-11-arm',
136
- 'arch': 'arm64',
137
- 'bin_name': 'mpm-windows-arm64-build-6f27db4.bin'},
138
- {'entry_point': 'mpm',
139
- 'commit': '346ce664f055fbd042a25ee0b7e96702e95',
140
- 'os': 'windows-2025',
141
- 'arch': 'x64',
142
- 'bin_name': 'mpm-windows-x64-build-346ce66.exe'},
143
- {'entry_point': 'mpm',
144
- 'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
145
- 'os': 'windows-2025',
146
- 'arch': 'x64',
147
- 'bin_name': 'mpm-windows-x64-build-6f27db4.exe'},
148
- {'state': 'stable'},
149
- {'state': 'unstable',
150
- 'os': 'windows-11-arm'}]}
53
+ 'include': [{'target': 'linux-arm64',
54
+ 'os': 'ubuntu-24.04-arm',
55
+ 'platform_id': 'linux',
56
+ 'arch': 'arm64',
57
+ 'extension': 'bin'},
58
+ {'target': 'linux-x64',
59
+ 'os': 'ubuntu-24.04',
60
+ 'platform_id': 'linux',
61
+ 'arch': 'x64',
62
+ 'extension': 'bin'},
63
+ {'target': 'macos-arm64',
64
+ 'os': 'macos-15',
65
+ 'platform_id': 'macos',
66
+ 'arch': 'arm64',
67
+ 'extension': 'bin'},
68
+ {'target': 'macos-x64',
69
+ 'os': 'macos-13',
70
+ 'platform_id': 'macos',
71
+ 'arch': 'x64',
72
+ 'extension': 'bin'},
73
+ {'target': 'windows-arm64',
74
+ 'os': 'windows-11-arm',
75
+ 'platform_id": 'windows',
76
+ 'arch": 'arm64',
77
+ 'extension": 'exe'},
78
+ {'target': 'windows-x64',
79
+ 'os': 'windows-2025',
80
+ 'platform_id': 'windows',
81
+ 'arch': 'x64',
82
+ 'extension': 'exe'},
83
+ {'entry_point': 'mpm',
84
+ 'cli_id': 'mpm',
85
+ 'module_id': 'meta_package_manager.__main__',
86
+ 'callable_id': 'main',
87
+ 'module_path': 'meta_package_manager/__main__.py'},
88
+ {'commit': '346ce664f055fbd042a25ee0b7e96702e95',
89
+ 'short_sha': '346ce66',
90
+ 'current_version': '2.0.0'},
91
+ {'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
92
+ 'short_sha': '6f27db4',
93
+ 'current_version': '1.9.1'},
94
+ {'os': 'ubuntu-24.04-arm',
95
+ 'entry_point': 'mpm',
96
+ 'commit': '346ce664f055fbd042a25ee0b7e96702e95',
97
+ 'bin_name': 'mpm-linux-arm64-346ce66.bin'},
98
+ {'os': 'ubuntu-24.04-arm',
99
+ 'entry_point': 'mpm',
100
+ 'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
101
+ 'bin_name': 'mpm-linux-arm64-6f27db4.bin'},
102
+ {'os': 'ubuntu-24.04',
103
+ 'entry_point': 'mpm',
104
+ 'commit': '346ce664f055fbd042a25ee0b7e96702e95',
105
+ 'bin_name': 'mpm-linux-x64-346ce66.bin'},
106
+ {'os': 'ubuntu-24.04',
107
+ 'entry_point': 'mpm',
108
+ 'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
109
+ 'bin_name': 'mpm-linux-x64-6f27db4.bin'},
110
+ {'os': 'macos-15',
111
+ 'entry_point': 'mpm',
112
+ 'commit': '346ce664f055fbd042a25ee0b7e96702e95',
113
+ 'bin_name': 'mpm-macos-arm64-346ce66.bin'},
114
+ {'os': 'macos-15',
115
+ 'entry_point': 'mpm',
116
+ 'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
117
+ 'bin_name': 'mpm-macos-arm64-6f27db4.bin'},
118
+ {'os': 'macos-13',
119
+ 'entry_point': 'mpm',
120
+ 'commit': '346ce664f055fbd042a25ee0b7e96702e95',
121
+ 'bin_name': 'mpm-macos-x64-346ce66.bin'},
122
+ {'os': 'macos-13',
123
+ 'entry_point': 'mpm',
124
+ 'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
125
+ 'bin_name': 'mpm-macos-x64-6f27db4.bin'},
126
+ {'os': 'windows-11-arm',
127
+ 'entry_point': 'mpm',
128
+ 'commit': '346ce664f055fbd042a25ee0b7e96702e95',
129
+ 'bin_name': 'mpm-windows-arm64-346ce66.bin'},
130
+ {'os': 'windows-11-arm',
131
+ 'entry_point': 'mpm',
132
+ 'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
133
+ 'bin_name': 'mpm-windows-arm64-6f27db4.bin'},
134
+ {'os': 'windows-2025',
135
+ 'entry_point': 'mpm',
136
+ 'commit': '346ce664f055fbd042a25ee0b7e96702e95',
137
+ 'bin_name': 'mpm-windows-x64-346ce66.exe'},
138
+ {'os': 'windows-2025',
139
+ 'entry_point': 'mpm',
140
+ 'commit': '6f27db47612aaee06fdf08744b09a9f5f6c2',
141
+ 'bin_name': 'mpm-windows-x64-6f27db4.exe'},
142
+ {'state': 'stable'}]}
151
143
  ```
152
144
 
153
145
  .. warning::
@@ -168,6 +160,7 @@ import tomllib
168
160
  from collections.abc import Iterable
169
161
  from enum import StrEnum
170
162
  from functools import cached_property
163
+ from operator import itemgetter
171
164
  from pathlib import Path
172
165
  from random import randint
173
166
  from re import escape
@@ -204,6 +197,76 @@ SHORT_SHA_LENGTH = 7
204
197
  """
205
198
 
206
199
 
200
+ NUITKA_BUILD_TARGETS = {
201
+ "linux-arm64": {
202
+ "os": "ubuntu-24.04-arm",
203
+ "platform_id": "linux",
204
+ "arch": "arm64",
205
+ "extension": "bin",
206
+ },
207
+ "linux-x64": {
208
+ "os": "ubuntu-24.04",
209
+ "platform_id": "linux",
210
+ "arch": "x64",
211
+ "extension": "bin",
212
+ },
213
+ "macos-arm64": {
214
+ "os": "macos-15",
215
+ "platform_id": "macos",
216
+ "arch": "arm64",
217
+ "extension": "bin",
218
+ },
219
+ "macos-x64": {
220
+ "os": "macos-13",
221
+ "platform_id": "macos",
222
+ "arch": "x64",
223
+ "extension": "bin",
224
+ },
225
+ "windows-arm64": {
226
+ "os": "windows-11-arm",
227
+ "platform_id": "windows",
228
+ "arch": "arm64",
229
+ "extension": "exe",
230
+ },
231
+ "windows-x64": {
232
+ "os": "windows-2025",
233
+ "platform_id": "windows",
234
+ "arch": "x64",
235
+ "extension": "exe",
236
+ },
237
+ }
238
+ """List of GitHub-hosted runners used for Nuitka builds.
239
+
240
+ The key of the dictionary is the target name, which is used as a short name for
241
+ user-friendlyness. As such, it is used to name the compiled binary.
242
+
243
+ Values are dictionaries with the following keys:
244
+
245
+ - ``os``: Operating system name, as used in `GitHub-hosted runners
246
+ <https://docs.github.com/en/actions/writing-workflows/choosing-where-your-workflow-runs/choosing-the-runner-for-a-job#standard-github-hosted-runners-for-public-repositories>`_.
247
+
248
+ .. hint::
249
+ We choose to run the compilation only on the latest supported version of each
250
+ OS, for each architecture. Note that macOS and Windows do not have the latest
251
+ version available for each architecture.
252
+
253
+ - ``platform_id``: Platform identifier, as defined by `Extra Platform
254
+ <https://github.com/kdeldycke/extra-platforms>`_.
255
+
256
+ - ``arch``: Architecture identifier.
257
+
258
+ .. note::
259
+ Architecture IDs are `inspired from those specified for self-hosted runners
260
+ <https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/supported-architectures-and-operating-systems-for-self-hosted-runners#supported-processor-architectures>`_
261
+
262
+ .. note::
263
+ Maybe we should just adopt `target triple
264
+ <https://mcyoung.xyz/2025/04/14/target-triples/>`_.
265
+
266
+ - ``extension``: File extension of the compiled binary.
267
+ """
268
+
269
+
207
270
  WorkflowEvent = StrEnum(
208
271
  "WorkflowEvent",
209
272
  (
@@ -287,8 +350,13 @@ MYPY_VERSION_MIN: Final = (3, 8)
287
350
  class Metadata:
288
351
  """Metadata class."""
289
352
 
290
- def __init__(self) -> None:
353
+ def __init__(self, unstable_targets: Iterable[str] | None = None) -> None:
291
354
  """Initialize internal variables."""
355
+ self.unstable_targets = set()
356
+ if unstable_targets:
357
+ self.unstable_targets = set(unstable_targets)
358
+ assert self.unstable_targets.issubset(NUITKA_BUILD_TARGETS)
359
+
292
360
  # None indicates the is_python_project variable has not been evaluated yet.
293
361
  self._is_python_project: bool | None = None
294
362
 
@@ -393,7 +461,8 @@ class Metadata:
393
461
  # repository.
394
462
  if past_commit_lookup:
395
463
  logging.debug(
396
- "We need to look into the commit history. Inspect the initial state of the repository."
464
+ "We need to look into the commit history. Inspect the initial state "
465
+ "of the repository."
397
466
  )
398
467
 
399
468
  if not is_github_ci():
@@ -401,9 +470,9 @@ class Metadata:
401
470
  "Local repository manipulations only allowed in CI environment"
402
471
  )
403
472
 
404
- # Save the initial commit reference and SHA of the repository. The reference is
405
- # either the canonical active branch name (i.e. ``main``), or the commit SHA if
406
- # the current HEAD commit is detached from a branch.
473
+ # Save the initial commit reference and SHA of the repository. The
474
+ # reference is either the canonical active branch name (i.e. ``main``), or
475
+ # the commit SHA if the current HEAD commit is detached from a branch.
407
476
  if git.repo.head.is_detached:
408
477
  init_ref = current_commit
409
478
  else:
@@ -416,7 +485,8 @@ class Metadata:
416
485
  git.repo.git.stash()
417
486
  counter_after = self.git_stash_count(git)
418
487
  logging.debug(
419
- f"Stash counter changes after 'git stash' command: {counter_before} -> {counter_after}"
488
+ "Stash counter changes after 'git stash' command: "
489
+ f"{counter_before} -> {counter_after}"
420
490
  )
421
491
  assert counter_after >= counter_before
422
492
  need_unstash = bool(counter_after > counter_before)
@@ -426,7 +496,8 @@ class Metadata:
426
496
  init_ref = None
427
497
  need_unstash = False
428
498
  logging.debug(
429
- f"No need to look into the commit history: repository is already checked out at {current_commit}"
499
+ "No need to look into the commit history: repository is already "
500
+ f"checked out at {current_commit}"
430
501
  )
431
502
 
432
503
  matrix = Matrix()
@@ -465,7 +536,8 @@ class Metadata:
465
536
  .. caution::
466
537
  This property is based on a crude heuristics as it only looks at the value
467
538
  of the ``GITHUB_BASE_REF`` environment variable. Which is `only set when
468
- the event that triggers a workflow run is either pull_request or pull_request_target
539
+ the event that triggers a workflow run is either pull_request or
540
+ pull_request_target
469
541
  <https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables>`_.
470
542
 
471
543
  .. todo::
@@ -499,9 +571,9 @@ class Metadata:
499
571
  request that is merged upstream but we'd like to produce artifacts (builds,
500
572
  packages, etc.) for each individual commit.
501
573
 
502
- The default ``GITHUB_SHA`` environment variable is not enough as it only points to
503
- the last commit. We need to inspect the commit history to find all new ones. New
504
- commits needs to be fetched differently in ``push`` and ``pull_requests``
574
+ The default ``GITHUB_SHA`` environment variable is not enough as it only points
575
+ to the last commit. We need to inspect the commit history to find all new ones.
576
+ New commits needs to be fetched differently in ``push`` and ``pull_requests``
505
577
  events.
506
578
 
507
579
  .. seealso::
@@ -511,8 +583,9 @@ class Metadata:
511
583
  - https://stackoverflow.com/a/61861763
512
584
 
513
585
  .. todo::
514
- Refactor so we can get rid of ``self.github_context``. Maybe there's enough metadata lying around in
515
- the environment variables that we can inspect the git history and find the commit range.
586
+ Refactor so we can get rid of ``self.github_context``. Maybe there's enough
587
+ metadata lying around in the environment variables that we can inspect the
588
+ git history and find the commit range.
516
589
  """
517
590
  if not self.github_context or not self.event_type:
518
591
  return None
@@ -680,7 +753,8 @@ class Metadata:
680
753
 
681
754
  @cached_property
682
755
  def script_entries(self) -> list[tuple[str, str, str]]:
683
- """Returns a list of tuples containing the script name, its module and callable.
756
+ """Returns a list of tuples containing the script name, its module and
757
+ callable.
684
758
 
685
759
  Results are derived from the script entries of ``pyproject.toml``. So that:
686
760
 
@@ -809,8 +883,8 @@ class Metadata:
809
883
 
810
884
  During a release we get two commits bundled into a single event. The first one
811
885
  is the release commit itself freezing the version to the release number. The
812
- second one is the commit that bumps the version to the next one. In this situation,
813
- the current version returned is the one from the most recent commit.
886
+ second one is the commit that bumps the version to the next one. In this
887
+ situation, the current version returned is the one from the most recent commit.
814
888
  """
815
889
  version = None
816
890
  if self.new_commits_matrix:
@@ -879,11 +953,6 @@ class Metadata:
879
953
 
880
954
  .. code-block:: python
881
955
  {
882
- "entry_point": ["mpm"],
883
- "commit": [
884
- "346ce664f055fbd042a25ee0b7e96702e95",
885
- "6f27db47612aaee06fdf08744b09a9f5f6c2",
886
- ],
887
956
  "os": [
888
957
  "ubuntu-24.04-arm",
889
958
  "ubuntu-24.04",
@@ -892,55 +961,51 @@ class Metadata:
892
961
  "windows-11-arm",
893
962
  "windows-2025",
894
963
  ],
964
+ "entry_point": [
965
+ "mpm",
966
+ ],
967
+ "commit": [
968
+ "346ce664f055fbd042a25ee0b7e96702e95",
969
+ "6f27db47612aaee06fdf08744b09a9f5f6c2",
970
+ ],
895
971
  "include": [
896
972
  {
897
- "entry_point": "mpm",
898
- "cli_id": "mpm",
899
- "module_id": "meta_package_manager.__main__",
900
- "callable_id": "main",
901
- "module_path": "meta_package_manager/__main__.py",
902
- },
903
- {
904
- "commit": "346ce664f055fbd042a25ee0b7e96702e95",
905
- "short_sha": "346ce66",
906
- "current_version": "2.0.0",
907
- },
908
- {
909
- "commit": "6f27db47612aaee06fdf08744b09a9f5f6c2",
910
- "short_sha": "6f27db4",
911
- "current_version": "1.9.1",
912
- },
913
- {
973
+ "target": "linux-arm64",
914
974
  "os": "ubuntu-24.04-arm",
915
975
  "platform_id": "linux",
916
976
  "arch": "arm64",
917
977
  "extension": "bin",
918
978
  },
919
979
  {
980
+ "target": "linux-x64",
920
981
  "os": "ubuntu-24.04",
921
982
  "platform_id": "linux",
922
983
  "arch": "x64",
923
984
  "extension": "bin",
924
985
  },
925
986
  {
987
+ "target": "macos-arm64",
926
988
  "os": "macos-15",
927
989
  "platform_id": "macos",
928
990
  "arch": "arm64",
929
991
  "extension": "bin",
930
992
  },
931
993
  {
994
+ "target": "macos-x64",
932
995
  "os": "macos-13",
933
996
  "platform_id": "macos",
934
997
  "arch": "x64",
935
998
  "extension": "bin",
936
999
  },
937
1000
  {
1001
+ "target": "windows-arm64",
938
1002
  "os": "windows-11-arm",
939
1003
  "platform_id": "windows",
940
1004
  "arch": "arm64",
941
1005
  "extension": "exe",
942
1006
  },
943
1007
  {
1008
+ "target": "windows-x64",
944
1009
  "os": "windows-2025",
945
1010
  "platform_id": "windows",
946
1011
  "arch": "x64",
@@ -948,94 +1013,95 @@ class Metadata:
948
1013
  },
949
1014
  {
950
1015
  "entry_point": "mpm",
1016
+ "cli_id": "mpm",
1017
+ "module_id": "meta_package_manager.__main__",
1018
+ "callable_id": "main",
1019
+ "module_path": "meta_package_manager/__main__.py",
1020
+ },
1021
+ {
951
1022
  "commit": "346ce664f055fbd042a25ee0b7e96702e95",
952
- "os": "ubuntu-24.04-arm",
953
- "arch": "arm64",
954
- "bin_name": "mpm-linux-arm64-build-346ce66.bin",
1023
+ "short_sha": "346ce66",
1024
+ "current_version": "2.0.0",
955
1025
  },
956
1026
  {
957
- "entry_point": "mpm",
958
1027
  "commit": "6f27db47612aaee06fdf08744b09a9f5f6c2",
959
- "os": "ubuntu-24.04-arm",
960
- "arch": "arm64",
961
- "bin_name": "mpm-linux-arm64-build-6f27db4.bin",
1028
+ "short_sha": "6f27db4",
1029
+ "current_version": "1.9.1",
962
1030
  },
963
1031
  {
1032
+ "os": "ubuntu-24.04-arm",
964
1033
  "entry_point": "mpm",
965
1034
  "commit": "346ce664f055fbd042a25ee0b7e96702e95",
966
- "os": "ubuntu-24.04",
967
- "arch": "x64",
968
- "bin_name": "mpm-linux-x64-build-346ce66.bin",
1035
+ "bin_name": "mpm-linux-arm64-346ce66.bin",
969
1036
  },
970
1037
  {
1038
+ "os": "ubuntu-24.04-arm",
971
1039
  "entry_point": "mpm",
972
1040
  "commit": "6f27db47612aaee06fdf08744b09a9f5f6c2",
973
- "os": "ubuntu-24.04",
974
- "arch": "x64",
975
- "bin_name": "mpm-linux-x64-build-6f27db4.bin",
1041
+ "bin_name": "mpm-linux-arm64-6f27db4.bin",
976
1042
  },
977
1043
  {
1044
+ "os": "ubuntu-24.04",
978
1045
  "entry_point": "mpm",
979
1046
  "commit": "346ce664f055fbd042a25ee0b7e96702e95",
980
- "os": "macos-15",
981
- "arch": "arm64",
982
- "bin_name": "mpm-macos-arm64-build-346ce66.bin",
1047
+ "bin_name": "mpm-linux-x64-346ce66.bin",
983
1048
  },
984
1049
  {
1050
+ "os": "ubuntu-24.04",
985
1051
  "entry_point": "mpm",
986
1052
  "commit": "6f27db47612aaee06fdf08744b09a9f5f6c2",
987
- "os": "macos-15",
988
- "arch": "arm64",
989
- "bin_name": "mpm-macos-arm64-build-6f27db4.bin",
1053
+ "bin_name": "mpm-linux-x64-6f27db4.bin",
990
1054
  },
991
1055
  {
1056
+ "os": "macos-15",
992
1057
  "entry_point": "mpm",
993
1058
  "commit": "346ce664f055fbd042a25ee0b7e96702e95",
994
- "os": "macos-13",
995
- "arch": "x64",
996
- "bin_name": "mpm-macos-x64-build-346ce66.bin",
1059
+ "bin_name": "mpm-macos-arm64-346ce66.bin",
997
1060
  },
998
1061
  {
1062
+ "os": "macos-15",
999
1063
  "entry_point": "mpm",
1000
1064
  "commit": "6f27db47612aaee06fdf08744b09a9f5f6c2",
1001
- "os": "macos-13",
1002
- "arch": "x64",
1003
- "bin_name": "mpm-macos-x64-build-6f27db4.bin",
1065
+ "bin_name": "mpm-macos-arm64-6f27db4.bin",
1004
1066
  },
1005
1067
  {
1068
+ "os": "macos-13",
1006
1069
  "entry_point": "mpm",
1007
1070
  "commit": "346ce664f055fbd042a25ee0b7e96702e95",
1008
- "os": "windows-11-arm",
1009
- "arch": "arm64",
1010
- "bin_name": "mpm-windows-arm64-build-346ce66.bin",
1071
+ "bin_name": "mpm-macos-x64-346ce66.bin",
1011
1072
  },
1012
1073
  {
1074
+ "os": "macos-13",
1013
1075
  "entry_point": "mpm",
1014
1076
  "commit": "6f27db47612aaee06fdf08744b09a9f5f6c2",
1015
- "os": "windows-11-arm",
1016
- "arch": "arm64",
1017
- "bin_name": "mpm-windows-arm64-build-6f27db4.bin",
1077
+ "bin_name": "mpm-macos-x64-6f27db4.bin",
1018
1078
  },
1019
1079
  {
1080
+ "os": "windows-11-arm",
1020
1081
  "entry_point": "mpm",
1021
1082
  "commit": "346ce664f055fbd042a25ee0b7e96702e95",
1022
- "os": "windows-2025",
1023
- "arch": "x64",
1024
- "bin_name": "mpm-windows-x64-build-346ce66.exe",
1083
+ "bin_name": "mpm-windows-arm64-346ce66.bin",
1025
1084
  },
1026
1085
  {
1086
+ "os": "windows-11-arm",
1027
1087
  "entry_point": "mpm",
1028
1088
  "commit": "6f27db47612aaee06fdf08744b09a9f5f6c2",
1089
+ "bin_name": "mpm-windows-arm64-6f27db4.bin",
1090
+ },
1091
+ {
1029
1092
  "os": "windows-2025",
1030
- "arch": "x64",
1031
- "bin_name": "mpm-windows-x64-build-6f27db4.exe",
1093
+ "entry_point": "mpm",
1094
+ "commit": "346ce664f055fbd042a25ee0b7e96702e95",
1095
+ "bin_name": "mpm-windows-x64-346ce66.exe",
1032
1096
  },
1033
1097
  {
1034
- "state": "stable",
1098
+ "os": "windows-2025",
1099
+ "entry_point": "mpm",
1100
+ "commit": "6f27db47612aaee06fdf08744b09a9f5f6c2",
1101
+ "bin_name": "mpm-windows-x64-6f27db4.exe",
1035
1102
  },
1036
1103
  {
1037
- "state": "unstable",
1038
- "os": "windows-11-arm",
1104
+ "state": "stable",
1039
1105
  },
1040
1106
  ],
1041
1107
  }
@@ -1046,20 +1112,13 @@ class Metadata:
1046
1112
 
1047
1113
  matrix = Matrix()
1048
1114
 
1049
- # Run the compilation only on the latest supported version of each OS. Note
1050
- # that macOS and Windows do not have the latest version available for each
1051
- # architecture.
1115
+ # Register all runners on which we want to run Nuitka builds.
1052
1116
  matrix.add_variation(
1053
- "os",
1054
- (
1055
- "ubuntu-24.04-arm", # arm64
1056
- "ubuntu-24.04", # x64
1057
- "macos-15", # arm64
1058
- "macos-13", # x64
1059
- "windows-11-arm", # arm64
1060
- "windows-2025", # x64
1061
- ),
1117
+ "os", tuple(map(itemgetter("os"), NUITKA_BUILD_TARGETS.values()))
1062
1118
  )
1119
+ # Augment each "os" entry with platform-specific data.
1120
+ for target_id, target_data in NUITKA_BUILD_TARGETS.items():
1121
+ matrix.add_includes({"target": target_id} | target_data)
1063
1122
 
1064
1123
  # Augment each entry point with some metadata.
1065
1124
  for cli_id, module_id, callable_id in self.script_entries:
@@ -1091,97 +1150,26 @@ class Metadata:
1091
1150
  matrix.add_variation("commit", build_commit_matrix["commit"])
1092
1151
  matrix.add_includes(*build_commit_matrix.include)
1093
1152
 
1094
- # Add platform-specific variables.
1095
- # Arch values are inspired from those specified for self-hosted runners:
1096
- # https://docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/supported-architectures-and-operating-systems-for-self-hosted-runners#supported-processor-architectures
1097
- # XXX Maybe we should just adopt target triple:
1098
- # https://mcyoung.xyz/2025/04/14/target-triples/
1099
- matrix.add_includes(
1100
- {
1101
- "os": "ubuntu-24.04-arm",
1102
- "platform_id": "linux",
1103
- "arch": "arm64",
1104
- "extension": "bin",
1105
- },
1106
- {
1107
- "os": "ubuntu-24.04",
1108
- "platform_id": "linux",
1109
- "arch": "x64",
1110
- "extension": "bin",
1111
- },
1112
- {
1113
- "os": "macos-15",
1114
- "platform_id": "macos",
1115
- "arch": "arm64",
1116
- "extension": "bin",
1117
- },
1118
- {
1119
- "os": "macos-13",
1120
- "platform_id": "macos",
1121
- "arch": "x64",
1122
- "extension": "bin",
1123
- },
1124
- {
1125
- "os": "windows-11-arm",
1126
- "platform_id": "windows",
1127
- "arch": "arm64",
1128
- "extension": "exe",
1129
- },
1130
- {
1131
- "os": "windows-2025",
1132
- "platform_id": "windows",
1133
- "arch": "x64",
1134
- "extension": "exe",
1135
- },
1136
- )
1137
-
1138
- # Augment each variation set of the matrix with a the binary name to be produced
1139
- # by Nuitka. Itererate over all matrix variation sets so we have all metadata
1140
- # necessary to generate a unique name specific to these variations.
1153
+ # Augment each variation set of the matrix with a the binary name to be
1154
+ # produced by Nuitka. Itererate over all matrix variation sets so we have all
1155
+ # metadata necessary to generate a unique name specific to these variations.
1141
1156
  for variations in matrix.solve():
1142
1157
  # We will re-attach back this binary name to the with an include directive,
1143
1158
  # so we need a copy the main variants it corresponds to.
1144
1159
  bin_name_include = {k: variations[k] for k in matrix}
1145
1160
  bin_name_include["bin_name"] = (
1146
- "{cli_id}-{platform_id}-{arch}-build-{short_sha}.{extension}"
1161
+ "{cli_id}-{target}-{short_sha}.{extension}"
1147
1162
  ).format(**variations)
1148
1163
  matrix.add_includes(bin_name_include)
1149
1164
 
1150
- matrix.add_includes(
1151
- # Default all jobs as stable, unless marked otherwise below.
1152
- {"state": "stable"},
1153
- # XXX Projects dependendong on lxml will not be able to compile on Windows
1154
- # ARM64: https://bugs.launchpad.net/lxml/+bug/2004481
1155
- #
1156
- # I tried to rely on vcpkg but this didn't work:
1157
- # - run: |
1158
- # vcpkg install libxml2:arm64-windows
1159
- # vcpkg install libxslt:arm64-windows
1160
- # vcpkg integrate install
1161
- #
1162
- # Another possibility would be to install the pre-built binaries available
1163
- # at: https://github.com/lxml/libxml2-win-binaries
1164
- #
1165
- # But all build attempts ends up with:
1166
- # C:\Users\RUNNER~1\AppData\Local\Temp\xmlXPathInit8xwj7_4f.c(1): fatal
1167
- # error C1083: Cannot open include file: 'libxml/xpath.h': No such file
1168
- # or directory
1169
- # ***********************************************************************
1170
- # Could not find function xmlXPathInit in library libxml2. Is libxml2
1171
- # installed?
1172
- # Is your C compiler installed and configured correctly?
1173
- # ***********************************************************************
1174
- # error: command 'C:\\Program Files\\Microsoft Visual
1175
- # Studio\\2022\\Enterprise\\VC\\Tools\\MSVC\\14.43.34808\\bin\\HostARM64
1176
- # \\ARM64\\cl.exe'
1177
- # failed with exit code 2
1178
- # hint: This usually indicates a problem with the package or the build
1179
- # environment.
1180
- #
1181
- # So keep an eye on Meta Package Manager builds, maybe one day it will
1182
- # succeed once the lxml project will works on Windows ARM64.
1183
- {"state": "unstable", "os": "windows-11-arm"},
1184
- )
1165
+ # All jobs are stable by default, unless marked otherwise by specific
1166
+ # configuration.
1167
+ matrix.add_includes({"state": "stable"})
1168
+ for unstable_target in self.unstable_targets:
1169
+ matrix.add_includes({
1170
+ "state": "unstable",
1171
+ "os": NUITKA_BUILD_TARGETS[unstable_target]["os"],
1172
+ })
1185
1173
 
1186
1174
  return matrix
1187
1175
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gha-utils
3
- Version: 4.16.7
3
+ Version: 4.17.0
4
4
  Summary: ⚙️ CLI helpers for GitHub Actions + reuseable workflows
5
5
  Author-email: Kevin Deldycke <kevin@deldycke.com>
6
6
  Project-URL: Homepage, https://github.com/kdeldycke/workflows
@@ -0,0 +1,14 @@
1
+ gha_utils/__init__.py,sha256=oqfu5AYEYvl05txD2xSSHv_PX9QDme-7fsqk0pK7Pmk,866
2
+ gha_utils/__main__.py,sha256=Dck9BjpLXmIRS83k0mghAMcYVYiMiFLltQdfRuMSP_Q,1703
3
+ gha_utils/changelog.py,sha256=JR7iQrWjLoIOpVNe6iXQSyEii82_hM_zrYpR7QO_Uxo,5777
4
+ gha_utils/cli.py,sha256=dj_n4ouQRNVzt5e9793sYsldaub1IgzFi6sEfA-kg-A,15295
5
+ gha_utils/mailmap.py,sha256=g3LQiPNjHsAgCbEYOJcQwdlXqxzmFh697vv2sxHZq-s,7014
6
+ gha_utils/matrix.py,sha256=_afJD0K-xZLNxwykVnUhD0Gj9cdO0Z43g3VHa-q_tkI,11941
7
+ gha_utils/metadata.py,sha256=UmdqhaTTwjJb1ZdWSGftkBB0NnQqFpiv39Opb8Hajb8,51189
8
+ gha_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
+ gha_utils/test_plan.py,sha256=AE8Mf1vSQG5EZTytoTts-gzMwUg2Zy21gUwkMlzXT94,13394
10
+ gha_utils-4.17.0.dist-info/METADATA,sha256=wPWg5hk2-6RxYoYXalLAWhmmEZAaJVz8_H926UyW3HE,21343
11
+ gha_utils-4.17.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
12
+ gha_utils-4.17.0.dist-info/entry_points.txt,sha256=8bJOwQYf9ZqsLhBR6gUCzvwLNI9f8tiiBrJ3AR0EK4o,54
13
+ gha_utils-4.17.0.dist-info/top_level.txt,sha256=C94Blb61YkkyPBwCdM3J_JPDjWH0lnKa5nGZeZ5M6yE,10
14
+ gha_utils-4.17.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.8.0)
2
+ Generator: setuptools (80.9.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,14 +0,0 @@
1
- gha_utils/__init__.py,sha256=Gm3e-7VF3Wz34F-D57bCldkn5yyrt88i8WqfV343wyg,866
2
- gha_utils/__main__.py,sha256=Dck9BjpLXmIRS83k0mghAMcYVYiMiFLltQdfRuMSP_Q,1703
3
- gha_utils/changelog.py,sha256=JR7iQrWjLoIOpVNe6iXQSyEii82_hM_zrYpR7QO_Uxo,5777
4
- gha_utils/cli.py,sha256=rN9F3Gb3rAZ5aH9EeHKGyV2u5kQ1v1q_VEYPlwPhjjw,14256
5
- gha_utils/mailmap.py,sha256=g3LQiPNjHsAgCbEYOJcQwdlXqxzmFh697vv2sxHZq-s,7014
6
- gha_utils/matrix.py,sha256=_afJD0K-xZLNxwykVnUhD0Gj9cdO0Z43g3VHa-q_tkI,11941
7
- gha_utils/metadata.py,sha256=BkNiTBcwbWh79VsBsAWg1kwmflkZGROprTSGAWj0ss4,52626
8
- gha_utils/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- gha_utils/test_plan.py,sha256=AE8Mf1vSQG5EZTytoTts-gzMwUg2Zy21gUwkMlzXT94,13394
10
- gha_utils-4.16.7.dist-info/METADATA,sha256=M0O0papnqNJnGOIOebl9JR61ibL87SVnQiOfu_eZOs8,21343
11
- gha_utils-4.16.7.dist-info/WHEEL,sha256=zaaOINJESkSfm_4HQVc5ssNzHCPXhJm0kEUakpsEHaU,91
12
- gha_utils-4.16.7.dist-info/entry_points.txt,sha256=8bJOwQYf9ZqsLhBR6gUCzvwLNI9f8tiiBrJ3AR0EK4o,54
13
- gha_utils-4.16.7.dist-info/top_level.txt,sha256=C94Blb61YkkyPBwCdM3J_JPDjWH0lnKa5nGZeZ5M6yE,10
14
- gha_utils-4.16.7.dist-info/RECORD,,