pypeline-runner 1.23.1__py3-none-any.whl → 1.23.2__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/bootstrap/run.py +26 -17
- pypeline/steps/create_venv.py +5 -5
- {pypeline_runner-1.23.1.dist-info → pypeline_runner-1.23.2.dist-info}/METADATA +1 -1
- {pypeline_runner-1.23.1.dist-info → pypeline_runner-1.23.2.dist-info}/RECORD +8 -8
- {pypeline_runner-1.23.1.dist-info → pypeline_runner-1.23.2.dist-info}/WHEEL +0 -0
- {pypeline_runner-1.23.1.dist-info → pypeline_runner-1.23.2.dist-info}/entry_points.txt +0 -0
- {pypeline_runner-1.23.1.dist-info → pypeline_runner-1.23.2.dist-info}/licenses/LICENSE +0 -0
pypeline/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "1.23.
|
|
1
|
+
__version__ = "1.23.2"
|
pypeline/bootstrap/run.py
CHANGED
|
@@ -583,6 +583,7 @@ class CreateVirtualEnvironment(Runnable):
|
|
|
583
583
|
self,
|
|
584
584
|
root_dir: Path,
|
|
585
585
|
bootstrap_env: CreateBootstrapEnvironment,
|
|
586
|
+
skip_venv_delete: bool = False,
|
|
586
587
|
) -> None:
|
|
587
588
|
self.root_dir = root_dir
|
|
588
589
|
self.venv_dir = self.root_dir / ".venv"
|
|
@@ -591,6 +592,7 @@ class CreateVirtualEnvironment(Runnable):
|
|
|
591
592
|
self.bootstrap_env = bootstrap_env
|
|
592
593
|
self.config = bootstrap_env.config
|
|
593
594
|
self.python_version_marker = self.venv_dir / VENV_PYTHON_VERSION_MARKER
|
|
595
|
+
self.skip_venv_delete = skip_venv_delete
|
|
594
596
|
|
|
595
597
|
@property
|
|
596
598
|
def package_manager_name(self) -> str:
|
|
@@ -602,6 +604,7 @@ class CreateVirtualEnvironment(Runnable):
|
|
|
602
604
|
|
|
603
605
|
If the Python version has changed (e.g., switching branches), delete the
|
|
604
606
|
existing venv so it can be recreated by the package manager.
|
|
607
|
+
If skip_venv_delete is True, log a warning instead of deleting.
|
|
605
608
|
"""
|
|
606
609
|
if not self.venv_dir.exists():
|
|
607
610
|
return
|
|
@@ -609,19 +612,27 @@ class CreateVirtualEnvironment(Runnable):
|
|
|
609
612
|
current_version = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
|
|
610
613
|
|
|
611
614
|
if not self.python_version_marker.exists():
|
|
612
|
-
|
|
613
|
-
f"No Python version marker found in {self.venv_dir}. "
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
615
|
+
if self.skip_venv_delete:
|
|
616
|
+
logger.warning(f"No Python version marker found in {self.venv_dir}. Cannot verify venv compatibility, but skipping deletion as requested.")
|
|
617
|
+
else:
|
|
618
|
+
logger.info(
|
|
619
|
+
f"No Python version marker found in {self.venv_dir}. "
|
|
620
|
+
f"This venv may have been created before version tracking was added. "
|
|
621
|
+
f"Deleting {self.venv_dir} to ensure clean state."
|
|
622
|
+
)
|
|
623
|
+
shutil.rmtree(self.venv_dir)
|
|
618
624
|
return
|
|
619
625
|
|
|
620
626
|
try:
|
|
621
627
|
stored_version = self.python_version_marker.read_text().strip()
|
|
622
628
|
if stored_version != current_version:
|
|
623
|
-
|
|
624
|
-
|
|
629
|
+
if self.skip_venv_delete:
|
|
630
|
+
logger.warning(
|
|
631
|
+
f"Python version changed from {stored_version} to {current_version}. Skipping venv deletion as requested - dependencies will be updated in place."
|
|
632
|
+
)
|
|
633
|
+
else:
|
|
634
|
+
logger.info(f"Python version changed from {stored_version} to {current_version}. Deleting {self.venv_dir} for recreation.")
|
|
635
|
+
shutil.rmtree(self.venv_dir)
|
|
625
636
|
except OSError as exc:
|
|
626
637
|
logger.warning(f"Could not read Python version marker: {exc}")
|
|
627
638
|
|
|
@@ -772,11 +783,11 @@ def main() -> int:
|
|
|
772
783
|
help="Specify the project directory (default: current working directory).",
|
|
773
784
|
)
|
|
774
785
|
parser.add_argument(
|
|
775
|
-
"--skip-venv-
|
|
786
|
+
"--skip-venv-delete",
|
|
776
787
|
action="store_true",
|
|
777
788
|
required=False,
|
|
778
789
|
default=False,
|
|
779
|
-
help="Skip the virtual environment
|
|
790
|
+
help="Skip deleting the virtual environment (used when running from within the venv). Dependencies will still be updated.",
|
|
780
791
|
)
|
|
781
792
|
parser.add_argument(
|
|
782
793
|
"--config",
|
|
@@ -804,13 +815,11 @@ def main() -> int:
|
|
|
804
815
|
bootstrap_executor.execute(bootstrap_env)
|
|
805
816
|
|
|
806
817
|
# Step 2: Create the project virtual environment using the bootstrap env
|
|
807
|
-
#
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
else:
|
|
813
|
-
logger.info("Skipping virtual environment creation as requested.")
|
|
818
|
+
# When skip_venv_delete is True (e.g., running from within the venv),
|
|
819
|
+
# we still update dependencies but skip deleting the venv to avoid write access exceptions
|
|
820
|
+
project_venv = CreateVirtualEnvironment(project_dir, bootstrap_env, skip_venv_delete=args.skip_venv_delete)
|
|
821
|
+
project_executor = Executor(project_venv.venv_dir)
|
|
822
|
+
project_executor.execute(project_venv)
|
|
814
823
|
|
|
815
824
|
except UserNotificationException as exc:
|
|
816
825
|
logger.error(exc)
|
pypeline/steps/create_venv.py
CHANGED
|
@@ -287,11 +287,11 @@ class CreateVEnv(PipelineStep[ExecutionContext]):
|
|
|
287
287
|
).execute()
|
|
288
288
|
else:
|
|
289
289
|
# Use internal bootstrap script
|
|
290
|
-
|
|
290
|
+
skip_venv_delete = False
|
|
291
291
|
python_executable = Path(sys.executable).absolute()
|
|
292
292
|
if python_executable.is_relative_to(self.project_root_dir):
|
|
293
|
-
self.logger.info(f"Detected that the python executable '{python_executable}' is from the virtual environment.
|
|
294
|
-
|
|
293
|
+
self.logger.info(f"Detected that the python executable '{python_executable}' is from the virtual environment. Will update dependencies but skip venv deletion.")
|
|
294
|
+
skip_venv_delete = True
|
|
295
295
|
|
|
296
296
|
# Create bootstrap.json with all configuration
|
|
297
297
|
bootstrap_config = {}
|
|
@@ -330,8 +330,8 @@ class CreateVEnv(PipelineStep[ExecutionContext]):
|
|
|
330
330
|
if self.bootstrap_config_file.exists():
|
|
331
331
|
bootstrap_args.extend(["--config", self.bootstrap_config_file.as_posix()])
|
|
332
332
|
|
|
333
|
-
if
|
|
334
|
-
bootstrap_args.append("--skip-venv-
|
|
333
|
+
if skip_venv_delete:
|
|
334
|
+
bootstrap_args.append("--skip-venv-delete")
|
|
335
335
|
|
|
336
336
|
# Copy the internal bootstrap script to the project root .bootstrap/bootstrap.py
|
|
337
337
|
self.target_internal_bootstrap_script.parent.mkdir(exist_ok=True)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
pypeline/__init__.py,sha256=
|
|
1
|
+
pypeline/__init__.py,sha256=E-2G4Hdg4R8nPq6b1QbVJLKpuG0f-4nDpEUCxDxWzzw,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=
|
|
4
|
+
pypeline/bootstrap/run.py,sha256=H5rxSa_owbAUpMA2lw-UhgBFB0eDgnQC0B4jYO8j3sE,33463
|
|
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=
|
|
24
|
+
pypeline/steps/create_venv.py,sha256=QFVJkMuRjbJSFAdl3nbiAn0JwquYemSJKi_4J9D0h0s,16753
|
|
25
25
|
pypeline/steps/env_setup_script.py,sha256=L8TwGo_Ugo2r4Z10MxtE0P8w0ApAxMKCHMnW-NkyG3w,4968
|
|
26
26
|
pypeline/steps/scoop_install.py,sha256=2MhsJ0iPmL8ueQhI52sKjVY9fqzj5xOQweQ65C0onfE,4117
|
|
27
27
|
pypeline/steps/west_install.py,sha256=hPyr28ksdKsQ0tv0gMNytzupgk1IgjN9CpmaBdX5zps,1947
|
|
28
|
-
pypeline_runner-1.23.
|
|
29
|
-
pypeline_runner-1.23.
|
|
30
|
-
pypeline_runner-1.23.
|
|
31
|
-
pypeline_runner-1.23.
|
|
32
|
-
pypeline_runner-1.23.
|
|
28
|
+
pypeline_runner-1.23.2.dist-info/METADATA,sha256=VwartKBN7HjvjHU1jrE5ptFelT6FNIfB5zP40ribdK8,7659
|
|
29
|
+
pypeline_runner-1.23.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
30
|
+
pypeline_runner-1.23.2.dist-info/entry_points.txt,sha256=pe1u0uuhPI_yeQ0KjEw6jK-EvQfPcZwBSajgbAdKz1o,47
|
|
31
|
+
pypeline_runner-1.23.2.dist-info/licenses/LICENSE,sha256=sKxdoqSmW9ezvPvt0ZGJbneyA0SBcm0GiqzTv2jN230,1066
|
|
32
|
+
pypeline_runner-1.23.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|