pypeline-runner 1.25.0__py3-none-any.whl → 1.26.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.
- pypeline/__init__.py +1 -1
- pypeline/steps/west_install.py +18 -8
- {pypeline_runner-1.25.0.dist-info → pypeline_runner-1.26.0.dist-info}/METADATA +1 -1
- {pypeline_runner-1.25.0.dist-info → pypeline_runner-1.26.0.dist-info}/RECORD +7 -7
- {pypeline_runner-1.25.0.dist-info → pypeline_runner-1.26.0.dist-info}/WHEEL +0 -0
- {pypeline_runner-1.25.0.dist-info → pypeline_runner-1.26.0.dist-info}/entry_points.txt +0 -0
- {pypeline_runner-1.25.0.dist-info → pypeline_runner-1.26.0.dist-info}/licenses/LICENSE +0 -0
pypeline/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.
|
|
1
|
+
__version__ = "1.26.0"
|
pypeline/steps/west_install.py
CHANGED
|
@@ -3,7 +3,7 @@ import json
|
|
|
3
3
|
import traceback
|
|
4
4
|
from dataclasses import dataclass, field
|
|
5
5
|
from pathlib import Path
|
|
6
|
-
from typing import Any, Optional
|
|
6
|
+
from typing import Any, Generic, Optional, TypeVar
|
|
7
7
|
|
|
8
8
|
import yaml
|
|
9
9
|
from mashumaro.config import BaseConfig
|
|
@@ -130,15 +130,22 @@ class WestInstallConfig(DataClassJSONMixin):
|
|
|
130
130
|
workspace_dir: Optional[str] = None
|
|
131
131
|
|
|
132
132
|
|
|
133
|
-
|
|
134
|
-
|
|
133
|
+
TContext = TypeVar("TContext", bound=ExecutionContext)
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
class WestInstall(PipelineStep[TContext], Generic[TContext]):
|
|
137
|
+
def __init__(self, execution_context: TContext, group_name: str, config: Optional[dict[str, Any]] = None) -> None:
|
|
135
138
|
super().__init__(execution_context, group_name, config)
|
|
136
139
|
self.logger = logger.bind()
|
|
137
140
|
self.install_result = WestInstallResult()
|
|
138
141
|
self.user_config = WestInstallConfig.from_dict(config) if config else WestInstallConfig()
|
|
139
142
|
|
|
140
143
|
self._west_workspace_dir = self._resolve_workspace_dir()
|
|
141
|
-
self.
|
|
144
|
+
self._manifest_files = self._collect_manifests()
|
|
145
|
+
|
|
146
|
+
@property
|
|
147
|
+
def _manifests(self) -> list[WestManifest]:
|
|
148
|
+
return [mf.manifest for mf in self._manifest_files]
|
|
142
149
|
|
|
143
150
|
def _resolve_workspace_dir(self) -> Path:
|
|
144
151
|
"""Resolve workspace directory from data registry (priority) or config."""
|
|
@@ -194,7 +201,10 @@ class WestInstall(PipelineStep[ExecutionContext]):
|
|
|
194
201
|
return {"workspace_dir": self.user_config.workspace_dir}
|
|
195
202
|
return None
|
|
196
203
|
|
|
197
|
-
def _merge_manifests(self
|
|
204
|
+
def _merge_manifests(self) -> WestManifest:
|
|
205
|
+
return self._do_merge_manifests(self._manifests)
|
|
206
|
+
|
|
207
|
+
def _do_merge_manifests(self, manifests: list[WestManifest]) -> WestManifest:
|
|
198
208
|
"""Merge multiple manifests, preserving order. First occurrence wins."""
|
|
199
209
|
merged = WestManifest()
|
|
200
210
|
for manifest in manifests:
|
|
@@ -255,7 +265,7 @@ class WestInstall(PipelineStep[ExecutionContext]):
|
|
|
255
265
|
self.logger.debug(f"Run {self.get_name()} step. Output dir: {self.output_dir}")
|
|
256
266
|
|
|
257
267
|
try:
|
|
258
|
-
merged_manifest = self._merge_manifests(
|
|
268
|
+
merged_manifest = self._merge_manifests()
|
|
259
269
|
self._write_west_manifest_file(merged_manifest)
|
|
260
270
|
|
|
261
271
|
if not merged_manifest.projects:
|
|
@@ -289,7 +299,7 @@ class WestInstall(PipelineStep[ExecutionContext]):
|
|
|
289
299
|
|
|
290
300
|
def get_inputs(self) -> list[Path]:
|
|
291
301
|
inputs: list[Path] = []
|
|
292
|
-
for manifest_file in self.
|
|
302
|
+
for manifest_file in self._manifest_files:
|
|
293
303
|
if manifest_file.file and manifest_file.file.exists():
|
|
294
304
|
inputs.append(manifest_file.file)
|
|
295
305
|
return inputs
|
|
@@ -298,7 +308,7 @@ class WestInstall(PipelineStep[ExecutionContext]):
|
|
|
298
308
|
outputs: list[Path] = [self._output_manifest_file, self._install_result_file]
|
|
299
309
|
if self.install_result.installed_dirs:
|
|
300
310
|
outputs.extend(self.install_result.installed_dirs)
|
|
301
|
-
elif self.
|
|
311
|
+
elif self._manifest_files:
|
|
302
312
|
outputs.append(self._west_workspace_dir)
|
|
303
313
|
return outputs
|
|
304
314
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pypeline/__init__.py,sha256=
|
|
1
|
+
pypeline/__init__.py,sha256=zO4HgDiFByCMtC_Zc6_0p0CaqPKBUXAcS4beihWW_Zs,23
|
|
2
2
|
pypeline/__run.py,sha256=TCdaX05Qm3g8T4QYryKB25Xxf0L5Km7hFOHe1mK9vI0,350
|
|
3
3
|
pypeline/bootstrap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
4
|
pypeline/bootstrap/run.py,sha256=H5rxSa_owbAUpMA2lw-UhgBFB0eDgnQC0B4jYO8j3sE,33463
|
|
@@ -24,9 +24,9 @@ pypeline/steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
|
24
24
|
pypeline/steps/create_venv.py,sha256=s8uL0cLfAF-AFvrU77KtdUMTE0v5ZDY2Ie_fO4ZqKjg,19050
|
|
25
25
|
pypeline/steps/env_setup_script.py,sha256=L8TwGo_Ugo2r4Z10MxtE0P8w0ApAxMKCHMnW-NkyG3w,4968
|
|
26
26
|
pypeline/steps/scoop_install.py,sha256=2MhsJ0iPmL8ueQhI52sKjVY9fqzj5xOQweQ65C0onfE,4117
|
|
27
|
-
pypeline/steps/west_install.py,sha256=
|
|
28
|
-
pypeline_runner-1.
|
|
29
|
-
pypeline_runner-1.
|
|
30
|
-
pypeline_runner-1.
|
|
31
|
-
pypeline_runner-1.
|
|
32
|
-
pypeline_runner-1.
|
|
27
|
+
pypeline/steps/west_install.py,sha256=eo-X0A9bKIeeW47DZFr6SZdNecxauyrqjAS9Pb4WSsY,11795
|
|
28
|
+
pypeline_runner-1.26.0.dist-info/METADATA,sha256=OmxivewCtvHCKwQb0sM1FW500TrkvnEWA6-cjtobOiI,8002
|
|
29
|
+
pypeline_runner-1.26.0.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
|
|
30
|
+
pypeline_runner-1.26.0.dist-info/entry_points.txt,sha256=pe1u0uuhPI_yeQ0KjEw6jK-EvQfPcZwBSajgbAdKz1o,47
|
|
31
|
+
pypeline_runner-1.26.0.dist-info/licenses/LICENSE,sha256=sKxdoqSmW9ezvPvt0ZGJbneyA0SBcm0GiqzTv2jN230,1066
|
|
32
|
+
pypeline_runner-1.26.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|