pypeline-runner 1.21.1__py3-none-any.whl → 1.22.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 CHANGED
@@ -1 +1 @@
1
- __version__ = "1.21.1"
1
+ __version__ = "1.22.0"
pypeline/bootstrap/run.py CHANGED
@@ -692,22 +692,27 @@ class CreateVirtualEnvironment(Runnable):
692
692
  return "create-virtual-environment"
693
693
 
694
694
  def get_inputs(self) -> List[Path]:
695
- venv_relevant_files = [
696
- "uv.lock",
697
- "poetry.lock",
698
- "poetry.toml",
699
- "pyproject.toml",
700
- ".env",
701
- "Pipfile",
702
- "Pipfile.lock",
703
- "bootstrap.json",
704
- ".bootstrap/bootstrap.ps1",
705
- ".bootstrap/bootstrap.py",
706
- "bootstrap.ps1",
707
- "bootstrap.py",
708
- str(self.bootstrap_env.marker_file),
709
- ]
710
- return [self.root_dir / file for file in venv_relevant_files]
695
+ """Get input dependencies based on package manager and actual bootstrap configuration."""
696
+ inputs = []
697
+
698
+ # Add package manager specific lock/config files
699
+ package_manager_files = {
700
+ "uv": ["uv.lock", "pyproject.toml"],
701
+ "poetry": ["poetry.lock", "poetry.toml", "pyproject.toml"],
702
+ "pipenv": ["Pipfile", "Pipfile.lock", ".env"],
703
+ }
704
+
705
+ if self.package_manager_name in package_manager_files:
706
+ for file in package_manager_files[self.package_manager_name]:
707
+ inputs.append(self.root_dir / file)
708
+
709
+ # Add bootstrap script (always tracked since CreateVEnv creates it)
710
+ inputs.append(self.bootstrap_dir / "bootstrap.py")
711
+
712
+ # Add the bootstrap environment marker
713
+ inputs.append(self.bootstrap_env.marker_file)
714
+
715
+ return inputs
711
716
 
712
717
  def get_outputs(self) -> List[Path]:
713
718
  """
@@ -721,6 +726,15 @@ class CreateVirtualEnvironment(Runnable):
721
726
  self.bootstrap_env.virtual_env.scripts_path(),
722
727
  ]
723
728
 
729
+ def get_config(self) -> Optional[dict[str, Any]]:
730
+ """Return configuration that affects the project environment."""
731
+ return {
732
+ "package_manager": self.config.package_manager,
733
+ "package_manager_args": self.config.package_manager_args,
734
+ "venv_install_command": self.config.venv_install_command,
735
+ "python_version": self.config.python_version,
736
+ }
737
+
724
738
 
725
739
  def print_environment_info() -> None:
726
740
  str_bar = "".join(["-" for _ in range(80)])
@@ -16,9 +16,8 @@ from py_app_dev.core.logging import logger
16
16
 
17
17
  from pypeline import __version__
18
18
  from pypeline.bootstrap.run import get_bootstrap_script
19
-
20
- from ..domain.execution_context import ExecutionContext
21
- from ..domain.pipeline import PipelineStep
19
+ from pypeline.domain.execution_context import ExecutionContext
20
+ from pypeline.domain.pipeline import PipelineStep
22
21
 
23
22
 
24
23
  @dataclass
@@ -143,15 +142,27 @@ class CreateVEnv(PipelineStep[ExecutionContext]):
143
142
  Get python executable to use.
144
143
 
145
144
  Priority:
146
- 1. User-specified python_executable config
147
- 2. Auto-detect from python_version config
148
- 3. Current Python interpreter (sys.executable)
145
+ 1. Input from execution context (execution_context.get_input("python_version"))
146
+ 2. User-specified python_executable config
147
+ 3. Auto-detect from python_version config
148
+ 4. Current Python interpreter (sys.executable)
149
149
  """
150
- # Priority 1: User explicitly specified executable
150
+ # Priority 1: Check execution context inputs first
151
+ input_python_version = self.execution_context.get_input("python_version")
152
+ if input_python_version:
153
+ found_executable = self._find_python_executable(input_python_version)
154
+ if found_executable:
155
+ return found_executable
156
+ # If version specified via input but not found, fail with helpful error
157
+ raise UserNotificationException(
158
+ f"Could not find Python {input_python_version} in PATH. Please install Python {input_python_version} or specify python_executable explicitly."
159
+ )
160
+
161
+ # Priority 2: User explicitly specified executable
151
162
  if self.user_config.python_executable:
152
163
  return self.user_config.python_executable
153
164
 
154
- # Priority 2: Auto-detect from python_version
165
+ # Priority 3: Auto-detect from python_version config
155
166
  if self.user_config.python_version:
156
167
  found_executable = self._find_python_executable(self.user_config.python_version)
157
168
  if found_executable:
@@ -161,7 +172,7 @@ class CreateVEnv(PipelineStep[ExecutionContext]):
161
172
  f"Could not find Python {self.user_config.python_version} in PATH. Please install Python {self.user_config.python_version} or specify python_executable explicitly."
162
173
  )
163
174
 
164
- # Priority 3: Use current interpreter
175
+ # Priority 4: Use current interpreter
165
176
  return sys.executable
166
177
 
167
178
  @property
@@ -220,8 +231,14 @@ class CreateVEnv(PipelineStep[ExecutionContext]):
220
231
  bootstrap_config = {}
221
232
  if self.user_config.package_manager:
222
233
  bootstrap_config["python_package_manager"] = self.user_config.package_manager
223
- if self.user_config.python_version:
234
+
235
+ # Priority: input python_version takes precedence over config python_version
236
+ input_python_version = self.execution_context.get_input("python_version")
237
+ if input_python_version:
238
+ bootstrap_config["python_version"] = input_python_version
239
+ elif self.user_config.python_version:
224
240
  bootstrap_config["python_version"] = self.user_config.python_version
241
+
225
242
  if self.user_config.package_manager_args:
226
243
  bootstrap_config["python_package_manager_args"] = self.user_config.package_manager_args
227
244
  if self.user_config.bootstrap_packages:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pypeline-runner
3
- Version: 1.21.1
3
+ Version: 1.22.0
4
4
  Summary: Configure and execute pipelines with Python (similar to GitHub workflows or Jenkins pipelines).
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -1,7 +1,7 @@
1
- pypeline/__init__.py,sha256=8XWiNC6QmLA2L7-p8EH42hl-pCAiZP4bTGm0gwwB3vI,23
1
+ pypeline/__init__.py,sha256=Szrc0NsRYdxS5fUcYkEqrRJ7XLunDfkSaKDKZIhbemc,23
2
2
  pypeline/__run.py,sha256=TCdaX05Qm3g8T4QYryKB25Xxf0L5Km7hFOHe1mK9vI0,350
3
3
  pypeline/bootstrap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- pypeline/bootstrap/run.py,sha256=-DP9os7i5QaxmYdp_kGnEAhMFCILv1YCRwiYxut3lEc,31394
4
+ pypeline/bootstrap/run.py,sha256=tFyi5LeH8OY9EjqvJww2Ruq6XVv0t3dDpmG5sU-VfyY,32167
5
5
  pypeline/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  pypeline/domain/artifacts.py,sha256=5k7cVfHhLmvWXNuHKxXb9ca4Lxu0JytGQqazENCeKEU,1404
7
7
  pypeline/domain/config.py,sha256=6vWdHi7B6MA7NGi9wWXQE-YhSg1COSRmc3b1ji6AdAk,2053
@@ -21,12 +21,12 @@ pypeline/main.py,sha256=k1CkeFGRvQ-zLv6C-AMLC2ed1iyFzDUdvEam3HLHy2E,4210
21
21
  pypeline/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
22
  pypeline/pypeline.py,sha256=mDKUnTuMDw8l-kSDJCHRNbn6zrxAfXhAIAqc5HyHd5M,8758
23
23
  pypeline/steps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- pypeline/steps/create_venv.py,sha256=PWYX1Abo384QH0IO4o52wTpl6G20NKGOSNd5xIDEvN8,12885
24
+ pypeline/steps/create_venv.py,sha256=O34M7GmsMnJTIw5aee4EwPAuwJD_gH3TI7EG6rkl-MY,13932
25
25
  pypeline/steps/env_setup_script.py,sha256=DRDCNMUDiW2rzkgEs0FhQfA_-WjPzPLb_e9dGc-mjLg,2526
26
26
  pypeline/steps/scoop_install.py,sha256=2MhsJ0iPmL8ueQhI52sKjVY9fqzj5xOQweQ65C0onfE,4117
27
27
  pypeline/steps/west_install.py,sha256=hPyr28ksdKsQ0tv0gMNytzupgk1IgjN9CpmaBdX5zps,1947
28
- pypeline_runner-1.21.1.dist-info/METADATA,sha256=AiVxdTBIVOeUwKVeC_ZHCFkcUtXT7bqVZQ7iXfFMaT8,7659
29
- pypeline_runner-1.21.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
30
- pypeline_runner-1.21.1.dist-info/entry_points.txt,sha256=pe1u0uuhPI_yeQ0KjEw6jK-EvQfPcZwBSajgbAdKz1o,47
31
- pypeline_runner-1.21.1.dist-info/licenses/LICENSE,sha256=sKxdoqSmW9ezvPvt0ZGJbneyA0SBcm0GiqzTv2jN230,1066
32
- pypeline_runner-1.21.1.dist-info/RECORD,,
28
+ pypeline_runner-1.22.0.dist-info/METADATA,sha256=q55q_iUj9db0iwELEZ2rJFd7iBIWPwuWO-dRZkJZdJ4,7659
29
+ pypeline_runner-1.22.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
30
+ pypeline_runner-1.22.0.dist-info/entry_points.txt,sha256=pe1u0uuhPI_yeQ0KjEw6jK-EvQfPcZwBSajgbAdKz1o,47
31
+ pypeline_runner-1.22.0.dist-info/licenses/LICENSE,sha256=sKxdoqSmW9ezvPvt0ZGJbneyA0SBcm0GiqzTv2jN230,1066
32
+ pypeline_runner-1.22.0.dist-info/RECORD,,