ScriptCollection 3.5.110__py3-none-any.whl → 3.5.112__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.
- ScriptCollection/Executables.py +1 -2
- ScriptCollection/SCLog.py +2 -0
- ScriptCollection/ScriptCollectionCore.py +1 -1
- ScriptCollection/TasksForCommonProjectStructure.py +17 -3
- {scriptcollection-3.5.110.dist-info → scriptcollection-3.5.112.dist-info}/METADATA +2 -2
- scriptcollection-3.5.112.dist-info/RECORD +16 -0
- {scriptcollection-3.5.110.dist-info → scriptcollection-3.5.112.dist-info}/WHEEL +1 -1
- scriptcollection-3.5.110.dist-info/RECORD +0 -16
- {scriptcollection-3.5.110.dist-info → scriptcollection-3.5.112.dist-info}/entry_points.txt +0 -0
- {scriptcollection-3.5.110.dist-info → scriptcollection-3.5.112.dist-info}/top_level.txt +0 -0
ScriptCollection/Executables.py
CHANGED
@@ -631,12 +631,11 @@ def CurrentUserHasElevatedPrivileges() -> int:
|
|
631
631
|
|
632
632
|
|
633
633
|
def Espoc() -> int:
|
634
|
-
GeneralUtilities.write_message_to_stdout("check...")
|
635
634
|
parser = argparse.ArgumentParser(description="Espoc (appreviation for 'exit started programs on close') is a tool to ensure the started processes of your program will also get terminated when the execution of your program is finished.")
|
636
635
|
parser.add_argument('-p', '--processid', required=True)
|
637
636
|
parser.add_argument('-f', '--file', required=True, help='Specifies the file where the process-ids of the started processes are stored (line by line). This file will be deleted when all started processes are terminated.')
|
638
637
|
args = parser.parse_args()
|
639
|
-
process_id =
|
638
|
+
process_id =int(args.processid)
|
640
639
|
process_list_file: str = args.file
|
641
640
|
if not os.path.isabs(process_list_file):
|
642
641
|
process_list_file = GeneralUtilities.resolve_relative_path(process_list_file, os.getcwd())
|
ScriptCollection/SCLog.py
CHANGED
@@ -2422,7 +2422,7 @@ class TasksForCommonProjectStructure:
|
|
2422
2422
|
GeneralUtilities.write_text_to_file(docker_compose_file, replaced)
|
2423
2423
|
|
2424
2424
|
@GeneralUtilities.check_arguments
|
2425
|
-
def start_dockerfile_example(self, current_file: str, verbosity: int, remove_old_container: bool, remove_volumes_folder: bool, commandline_arguments: list[str]) -> None:
|
2425
|
+
def start_dockerfile_example(self, current_file: str, verbosity: int, remove_old_container: bool, remove_volumes_folder: bool, commandline_arguments: list[str],env_file:str) -> None:
|
2426
2426
|
verbosity = TasksForCommonProjectStructure.get_verbosity_from_commandline_arguments(commandline_arguments, verbosity)
|
2427
2427
|
folder = os.path.dirname(current_file)
|
2428
2428
|
example_name = os.path.basename(folder)
|
@@ -2438,7 +2438,7 @@ class TasksForCommonProjectStructure:
|
|
2438
2438
|
container_names.append(match.group(1))
|
2439
2439
|
GeneralUtilities.write_message_to_stdout(f"Ensure container of {docker_compose_file} do not exist...")
|
2440
2440
|
for container_name in container_names:
|
2441
|
-
GeneralUtilities.write_message_to_stdout(f"Ensure container
|
2441
|
+
GeneralUtilities.write_message_to_stdout(f"Ensure container {container_name} does not exist...")
|
2442
2442
|
self.__sc.run_program("docker", f"container rm -f {container_name}", oci_image_artifacts_folder, verbosity=0, throw_exception_if_exitcode_is_not_zero=False)
|
2443
2443
|
if remove_volumes_folder:
|
2444
2444
|
volumes_folder = os.path.join(folder, "Volumes")
|
@@ -2449,7 +2449,21 @@ class TasksForCommonProjectStructure:
|
|
2449
2449
|
self.__sc.run_program("docker", f"load -i {image_filename}", oci_image_artifacts_folder, verbosity=verbosity)
|
2450
2450
|
docker_project_name = f"{codeunit_name}_{example_name}".lower()
|
2451
2451
|
GeneralUtilities.write_message_to_stdout("Start docker-container...")
|
2452
|
-
|
2452
|
+
argument=f"compose --project-name {docker_project_name}"
|
2453
|
+
if env_file is not None:
|
2454
|
+
argument=f"{argument} --env-file {env_file}"
|
2455
|
+
argument=f"{argument} up --detach"
|
2456
|
+
self.__sc.run_program("docker", argument, folder, verbosity=verbosity)
|
2457
|
+
|
2458
|
+
@GeneralUtilities.check_arguments
|
2459
|
+
def ensure_env_file_is_generated(self,current_file:str,env_file_name:str, env_values:dict[str,str]):
|
2460
|
+
folder = os.path.dirname(current_file)
|
2461
|
+
env_file=os.path.join(folder,env_file_name)
|
2462
|
+
if not os.path.isfile(env_file):
|
2463
|
+
lines=[]
|
2464
|
+
for key,value in env_values.items():
|
2465
|
+
lines.append(f"{key}={value}")
|
2466
|
+
GeneralUtilities.write_lines_to_file(env_file,lines)
|
2453
2467
|
|
2454
2468
|
@GeneralUtilities.check_arguments
|
2455
2469
|
def stop_dockerfile_example(self, current_file: str, verbosity: int, remove_old_container: bool, remove_volumes_folder: bool, commandline_arguments: list[str]) -> None:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ScriptCollection
|
3
|
-
Version: 3.5.
|
3
|
+
Version: 3.5.112
|
4
4
|
Summary: The ScriptCollection is the place for reusable scripts.
|
5
5
|
Home-page: https://github.com/anionDev/ScriptCollection
|
6
6
|
Author: Marius Göcke
|
@@ -34,7 +34,7 @@ Requires-Dist: Pillow>=11.2.1
|
|
34
34
|
Requires-Dist: psutil>=7.0.0
|
35
35
|
Requires-Dist: pycdlib>=1.14.0
|
36
36
|
Requires-Dist: Pygments>=2.19.1
|
37
|
-
Requires-Dist: pylint>=3.3.
|
37
|
+
Requires-Dist: pylint>=3.3.7
|
38
38
|
Requires-Dist: pyOpenSSL>=25.0.0
|
39
39
|
Requires-Dist: PyPDF>=5.4.0
|
40
40
|
Requires-Dist: pytest>=8.3.5
|
@@ -0,0 +1,16 @@
|
|
1
|
+
ScriptCollection/CertificateUpdater.py,sha256=pJopWFcwaLAEVljtC4O3SVrlpIpoJNUhT1V4mgiqLvE,8970
|
2
|
+
ScriptCollection/Executables.py,sha256=ht-RZFu4g34Sr09b_L0c2QpKcjLWX-wFtKSMDMZYqsw,32266
|
3
|
+
ScriptCollection/GeneralUtilities.py,sha256=VO4a7xctkjN5dcBXc32gz0x9U07DEagasjvYVKqLmdM,44173
|
4
|
+
ScriptCollection/ProcessesRunner.py,sha256=3mu4ZxzZleQo0Op6o9EYTCFiJfb6kx5ov2YfZfT89mU,1395
|
5
|
+
ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4bQNM6RV6Y,2480
|
6
|
+
ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
|
7
|
+
ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
|
8
|
+
ScriptCollection/SCLog.py,sha256=5qjOBYiliyHV57GY8Y5dgUek512EVI8AzBF288R4fn4,2377
|
9
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=oBMRbX28iOdhNEkbj9f3RMwJ7dlpCfwjGWyHtyEGM0w,130404
|
10
|
+
ScriptCollection/TasksForCommonProjectStructure.py,sha256=eHEv6NWXSHSX_D7HS6_hWLCGfdz4Phwxdh7WUwuiX8I,233536
|
11
|
+
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
|
+
scriptcollection-3.5.112.dist-info/METADATA,sha256=XnZ0e80brcBylLdXrl7ekyZglqnCn5GRV7VE-l5JtaM,7694
|
13
|
+
scriptcollection-3.5.112.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
14
|
+
scriptcollection-3.5.112.dist-info/entry_points.txt,sha256=3qMbfZEMhc_VTJj-bcLwB8AWcn9iXSB3l0AWpuu52Bs,3689
|
15
|
+
scriptcollection-3.5.112.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
16
|
+
scriptcollection-3.5.112.dist-info/RECORD,,
|
@@ -1,16 +0,0 @@
|
|
1
|
-
ScriptCollection/CertificateUpdater.py,sha256=pJopWFcwaLAEVljtC4O3SVrlpIpoJNUhT1V4mgiqLvE,8970
|
2
|
-
ScriptCollection/Executables.py,sha256=BsDgpqU_XKXg-7paQdmamzU14-2kcqjz9v13r96EiEk,32319
|
3
|
-
ScriptCollection/GeneralUtilities.py,sha256=VO4a7xctkjN5dcBXc32gz0x9U07DEagasjvYVKqLmdM,44173
|
4
|
-
ScriptCollection/ProcessesRunner.py,sha256=3mu4ZxzZleQo0Op6o9EYTCFiJfb6kx5ov2YfZfT89mU,1395
|
5
|
-
ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4bQNM6RV6Y,2480
|
6
|
-
ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
|
7
|
-
ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
|
8
|
-
ScriptCollection/SCLog.py,sha256=Gw27Oclcb0ten7_89PD5CdNMoO-at2hGUOYbF-x1HPQ,2296
|
9
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=2RmUIh9GWngFo9ucfNrTfcTYQ5KD7RI4iJOUSPelqsA,130404
|
10
|
-
ScriptCollection/TasksForCommonProjectStructure.py,sha256=5GnI89wwy8_uJH_pZtd0zgZ1C0ReIrZeePjUIwo2sus,232910
|
11
|
-
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
|
-
scriptcollection-3.5.110.dist-info/METADATA,sha256=W6tx5MA4Vq71V45HNdsJG1MHJDd9ifbe7OVmgaEm780,7694
|
13
|
-
scriptcollection-3.5.110.dist-info/WHEEL,sha256=GHB6lJx2juba1wDgXDNlMTyM13ckjBMKf-OnwgKOCtA,91
|
14
|
-
scriptcollection-3.5.110.dist-info/entry_points.txt,sha256=3qMbfZEMhc_VTJj-bcLwB8AWcn9iXSB3l0AWpuu52Bs,3689
|
15
|
-
scriptcollection-3.5.110.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
16
|
-
scriptcollection-3.5.110.dist-info/RECORD,,
|
File without changes
|
File without changes
|