pypeline-runner 1.16.1__tar.gz → 1.17.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 (32) hide show
  1. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/PKG-INFO +1 -1
  2. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/pyproject.toml +1 -1
  3. pypeline_runner-1.17.0/src/pypeline/__init__.py +1 -0
  4. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/steps/create_venv.py +19 -3
  5. pypeline_runner-1.16.1/src/pypeline/__init__.py +0 -1
  6. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/LICENSE +0 -0
  7. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/README.md +0 -0
  8. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/__run.py +0 -0
  9. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/bootstrap/__init__.py +0 -0
  10. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/bootstrap/run.py +0 -0
  11. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/domain/__init__.py +0 -0
  12. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/domain/artifacts.py +0 -0
  13. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/domain/config.py +0 -0
  14. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/domain/execution_context.py +0 -0
  15. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/domain/pipeline.py +0 -0
  16. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/domain/project_slurper.py +0 -0
  17. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/inputs_parser.py +0 -0
  18. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/kickstart/__init__.py +0 -0
  19. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/kickstart/create.py +0 -0
  20. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/kickstart/templates/project/.gitignore +0 -0
  21. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/kickstart/templates/project/pypeline.ps1 +0 -0
  22. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/kickstart/templates/project/pypeline.yaml +0 -0
  23. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/kickstart/templates/project/pyproject.toml +0 -0
  24. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/kickstart/templates/project/steps/my_step.py +0 -0
  25. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/kickstart/templates/project/west.yaml +0 -0
  26. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/main.py +0 -0
  27. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/py.typed +0 -0
  28. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/pypeline.py +0 -0
  29. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/steps/__init__.py +0 -0
  30. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/steps/env_setup_script.py +0 -0
  31. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/steps/scoop_install.py +0 -0
  32. {pypeline_runner-1.16.1 → pypeline_runner-1.17.0}/src/pypeline/steps/west_install.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pypeline-runner
3
- Version: 1.16.1
3
+ Version: 1.17.0
4
4
  Summary: Configure and execute pipelines with Python (similar to GitHub workflows or Jenkins pipelines).
5
5
  License: MIT
6
6
  Author: cuinixam
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pypeline-runner"
3
- version = "1.16.1"
3
+ version = "1.17.0"
4
4
  description = "Configure and execute pipelines with Python (similar to GitHub workflows or Jenkins pipelines)."
5
5
  authors = ["cuinixam <me@cuinixam.com>"]
6
6
  license = "MIT"
@@ -0,0 +1 @@
1
+ __version__ = "1.17.0"
@@ -41,7 +41,7 @@ class CreateVEnv(PipelineStep[ExecutionContext]):
41
41
  self.bootstrap_script_type = BootstrapScriptType.CUSTOM if self.user_config.bootstrap_script else BootstrapScriptType.INTERNAL
42
42
  super().__init__(execution_context, group_name, config)
43
43
  self.logger = logger.bind()
44
- self.bootstrap_script = get_bootstrap_script()
44
+ self.internal_bootstrap_script = get_bootstrap_script()
45
45
  self.package_manager = self.user_config.package_manager if self.user_config.package_manager else self.DEFAULT_PACKAGE_MANAGER
46
46
  self.python_executable = self.user_config.python_executable if self.user_config.python_executable else self.DEFAULT_PYTHON_EXECUTABLE
47
47
  self.venv_dir = self.project_root_dir / ".venv"
@@ -62,6 +62,10 @@ class CreateVEnv(PipelineStep[ExecutionContext]):
62
62
  else:
63
63
  raise UserNotificationException(f"Could not extract the package manager name from {self.package_manager}")
64
64
 
65
+ @property
66
+ def target_internal_bootstrap_script(self) -> Path:
67
+ return self.project_root_dir.joinpath(".bootstrap/bootstrap.py")
68
+
65
69
  def get_name(self) -> str:
66
70
  return self.__class__.__name__
67
71
 
@@ -84,10 +88,19 @@ class CreateVEnv(PipelineStep[ExecutionContext]):
84
88
  "--package-manager",
85
89
  f'"{self.package_manager}"',
86
90
  ]
91
+
92
+ # Copy the internal bootstrap script to the project root .bootstrap/bootstrap.py
93
+ self.target_internal_bootstrap_script.parent.mkdir(exist_ok=True)
94
+ if not self.target_internal_bootstrap_script.exists() or self.target_internal_bootstrap_script.read_text() != self.internal_bootstrap_script.read_text():
95
+ self.target_internal_bootstrap_script.write_text(self.internal_bootstrap_script.read_text())
96
+ self.logger.warning(f"Updated bootstrap script at {self.target_internal_bootstrap_script}")
97
+
98
+ # Run the copied bootstrap script
87
99
  self.execution_context.create_process_executor(
88
- [self.python_executable, self.bootstrap_script.as_posix(), *bootstrap_args],
100
+ [self.python_executable, self.target_internal_bootstrap_script.as_posix(), *bootstrap_args],
89
101
  cwd=self.project_root_dir,
90
102
  ).execute()
103
+
91
104
  return 0
92
105
 
93
106
  def get_inputs(self) -> List[Path]:
@@ -95,7 +108,10 @@ class CreateVEnv(PipelineStep[ExecutionContext]):
95
108
  return [self.project_root_dir / file for file in package_manager_relevant_file]
96
109
 
97
110
  def get_outputs(self) -> List[Path]:
98
- return [self.venv_dir]
111
+ outputs = [self.venv_dir]
112
+ if self.bootstrap_script_type == BootstrapScriptType.INTERNAL:
113
+ outputs.append(self.target_internal_bootstrap_script)
114
+ return outputs
99
115
 
100
116
  def get_config(self) -> Optional[dict[str, str]]:
101
117
  return {
@@ -1 +0,0 @@
1
- __version__ = "1.16.1"