ScriptCollection 3.5.160__py3-none-any.whl → 3.5.162__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/GeneralUtilities.py +12 -11
- ScriptCollection/ScriptCollectionCore.py +3 -2
- ScriptCollection/TasksForCommonProjectStructure.py +12 -8
- {scriptcollection-3.5.160.dist-info → scriptcollection-3.5.162.dist-info}/METADATA +2 -2
- {scriptcollection-3.5.160.dist-info → scriptcollection-3.5.162.dist-info}/RECORD +8 -8
- {scriptcollection-3.5.160.dist-info → scriptcollection-3.5.162.dist-info}/WHEEL +0 -0
- {scriptcollection-3.5.160.dist-info → scriptcollection-3.5.162.dist-info}/entry_points.txt +0 -0
- {scriptcollection-3.5.160.dist-info → scriptcollection-3.5.162.dist-info}/top_level.txt +0 -0
@@ -7,6 +7,7 @@ import re
|
|
7
7
|
import os
|
8
8
|
import subprocess
|
9
9
|
import shutil
|
10
|
+
import time
|
10
11
|
import urllib
|
11
12
|
import stat
|
12
13
|
import secrets
|
@@ -369,7 +370,7 @@ class GeneralUtilities:
|
|
369
370
|
@check_arguments
|
370
371
|
def datetime_to_string_for_logfile_entry(datetime_object: datetime, add_milliseconds: bool = False) -> str:
|
371
372
|
if datetime_object.tzinfo is None:
|
372
|
-
datetime_object=datetime_object.replace(tzinfo=timezone.utc)#assume utc when no timezone is given
|
373
|
+
datetime_object = datetime_object.replace(tzinfo=timezone.utc) # assume utc when no timezone is given
|
373
374
|
pattern: str = None
|
374
375
|
if add_milliseconds:
|
375
376
|
pattern = "%Y-%m-%dT%H:%M:%S.%f%z"
|
@@ -635,8 +636,8 @@ class GeneralUtilities:
|
|
635
636
|
@staticmethod
|
636
637
|
@check_arguments
|
637
638
|
def read_lines_from_file(file: str, encoding="utf-8") -> list[str]:
|
638
|
-
content=GeneralUtilities.read_text_from_file(file, encoding)
|
639
|
-
if len(content)==0:
|
639
|
+
content = GeneralUtilities.read_text_from_file(file, encoding)
|
640
|
+
if len(content) == 0:
|
640
641
|
return []
|
641
642
|
else:
|
642
643
|
return [GeneralUtilities.strip_new_line_character(line) for line in content.split('\n')]
|
@@ -869,7 +870,7 @@ class GeneralUtilities:
|
|
869
870
|
@staticmethod
|
870
871
|
@check_arguments
|
871
872
|
def get_time_based_logfilename(name: str = "Log") -> str:
|
872
|
-
d=GeneralUtilities.get_now()
|
873
|
+
d = GeneralUtilities.get_now()
|
873
874
|
return f"{name}_{GeneralUtilities.datetime_to_string_for_logfile_name(d)}"
|
874
875
|
|
875
876
|
@staticmethod
|
@@ -1040,7 +1041,7 @@ class GeneralUtilities:
|
|
1040
1041
|
@staticmethod
|
1041
1042
|
@check_arguments
|
1042
1043
|
def certificate_is_expired(certificate_file: str) -> bool:
|
1043
|
-
return GeneralUtilities.get_certificate_expiry_date(certificate_file) <GeneralUtilities.get_now()
|
1044
|
+
return GeneralUtilities.get_certificate_expiry_date(certificate_file) < GeneralUtilities.get_now()
|
1044
1045
|
|
1045
1046
|
@staticmethod
|
1046
1047
|
@check_arguments
|
@@ -1109,14 +1110,14 @@ class GeneralUtilities:
|
|
1109
1110
|
result = action()
|
1110
1111
|
return result
|
1111
1112
|
except Exception:
|
1113
|
+
time.sleep(1.1)
|
1112
1114
|
amount_of_fails = amount_of_fails+1
|
1113
1115
|
GeneralUtilities.assert_condition(not (amount_of_attempts < amount_of_fails))
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
raise
|
1116
|
+
message = f"Action failed {amount_of_attempts} times."
|
1117
|
+
if action_name is not None:
|
1118
|
+
message = f"{message} Name of action: {action_name}"
|
1119
|
+
GeneralUtilities.write_message_to_stderr(message)
|
1120
|
+
raise
|
1120
1121
|
return None
|
1121
1122
|
|
1122
1123
|
@staticmethod
|
@@ -36,7 +36,7 @@ from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
36
36
|
from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument
|
37
37
|
from .SCLog import SCLog, LogLevel
|
38
38
|
|
39
|
-
version = "3.5.
|
39
|
+
version = "3.5.162"
|
40
40
|
__version__ = version
|
41
41
|
|
42
42
|
|
@@ -2046,7 +2046,8 @@ DNS = {domain}
|
|
2046
2046
|
package_name = line.replace(">", GeneralUtilities.empty_string).strip().split(" ")[0]
|
2047
2047
|
if not (package_name in ignored_dependencies):
|
2048
2048
|
self.log.log(f"Update package {package_name}...", LogLevel.Debug)
|
2049
|
-
|
2049
|
+
time.sleep(1.1) # attempt to prevent rate-limit
|
2050
|
+
self.run_program_with_retry("dotnet", f"add {csproj_filename} package {package_name}", folder, print_errors_as_information=True)
|
2050
2051
|
|
2051
2052
|
@GeneralUtilities.check_arguments
|
2052
2053
|
def create_deb_package(self, toolname: str, binary_folder: str, control_file_content: str, deb_output_folder: str, verbosity: int, permission_of_executable_file_as_octet_triple: int) -> None:
|
@@ -256,10 +256,14 @@ class TasksForCommonProjectStructure:
|
|
256
256
|
shutil.copyfile(full_source_file, target_file)
|
257
257
|
|
258
258
|
@GeneralUtilities.check_arguments
|
259
|
-
def standardized_tasks_build_for_dart_project_in_common_project_structure(self, build_script_file: str, verbosity: int, targets: list[str], args: list[str], package_name: str):
|
259
|
+
def standardized_tasks_build_for_dart_project_in_common_project_structure(self, build_script_file: str, verbosity: int, targets: list[str], args: list[str], package_name: str = None):
|
260
260
|
codeunit_folder = GeneralUtilities.resolve_relative_path("../../..", build_script_file)
|
261
261
|
codeunit_name = os.path.basename(codeunit_folder)
|
262
|
-
src_folder =
|
262
|
+
src_folder: str = None
|
263
|
+
if package_name is None:
|
264
|
+
src_folder = codeunit_folder
|
265
|
+
else:
|
266
|
+
src_folder = GeneralUtilities.resolve_relative_path(package_name, codeunit_folder) # TODO replace packagename
|
263
267
|
artifacts_folder = os.path.join(codeunit_folder, "Other", "Artifacts")
|
264
268
|
verbosity = self.get_verbosity_from_commandline_arguments(args, verbosity)
|
265
269
|
target_names: dict[str, str] = {
|
@@ -269,7 +273,7 @@ class TasksForCommonProjectStructure:
|
|
269
273
|
"appbundle": "Android",
|
270
274
|
}
|
271
275
|
for target in targets:
|
272
|
-
GeneralUtilities.write_message_to_stdout(f"Build
|
276
|
+
GeneralUtilities.write_message_to_stdout(f"Build flutter-codeunit {codeunit_name} for target {target_names[target]}...")
|
273
277
|
self.run_with_epew("flutter", f"build {target}", src_folder, verbosity)
|
274
278
|
if target == "web":
|
275
279
|
web_relase_folder = os.path.join(src_folder, "build/web")
|
@@ -1474,13 +1478,13 @@ class TasksForCommonProjectStructure:
|
|
1474
1478
|
GeneralUtilities.write_message_to_stdout("Load image...")
|
1475
1479
|
self.__sc.run_program("docker", f"load --input {image_filename}", applicationimage_folder, verbosity=verbosity)
|
1476
1480
|
GeneralUtilities.write_message_to_stdout("Tag image...")
|
1477
|
-
self.__sc.
|
1478
|
-
self.__sc.
|
1481
|
+
self.__sc.run_program_with_retry("docker", f"tag {local_image_name}:{codeunit_version} {remote_image_latest}", verbosity=verbosity)
|
1482
|
+
self.__sc.run_program_with_retry("docker", f"tag {local_image_name}:{codeunit_version} {remote_image_version}", verbosity=verbosity)
|
1479
1483
|
GeneralUtilities.write_message_to_stdout("Push image...")
|
1480
|
-
self.__sc.
|
1481
|
-
self.__sc.
|
1484
|
+
self.__sc.run_program_with_retry("docker", f"push {remote_image_latest}", verbosity=verbosity)
|
1485
|
+
self.__sc.run_program_with_retry("docker", f"push {remote_image_version}", verbosity=verbosity)
|
1482
1486
|
if push_readme:
|
1483
|
-
self.__sc.
|
1487
|
+
self.__sc.run_program_with_retry("docker-pushrm", f"{remote_repo}", codeunit_folder, verbosity=verbosity)
|
1484
1488
|
|
1485
1489
|
@GeneralUtilities.check_arguments
|
1486
1490
|
def get_dependent_code_units(self, codeunit_file: str) -> list[str]:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ScriptCollection
|
3
|
-
Version: 3.5.
|
3
|
+
Version: 3.5.162
|
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
|
@@ -35,7 +35,7 @@ Requires-Dist: psutil>=7.0.0
|
|
35
35
|
Requires-Dist: pycdlib>=1.14.0
|
36
36
|
Requires-Dist: Pygments>=2.19.2
|
37
37
|
Requires-Dist: pylint>=3.3.8
|
38
|
-
Requires-Dist: pyOpenSSL>=25.
|
38
|
+
Requires-Dist: pyOpenSSL>=25.3.0
|
39
39
|
Requires-Dist: PyPDF>=6.0.0
|
40
40
|
Requires-Dist: pytest>=8.4.2
|
41
41
|
Requires-Dist: PyYAML>=6.0.2
|
@@ -1,17 +1,17 @@
|
|
1
1
|
ScriptCollection/CertificateUpdater.py,sha256=OAxrG21k_o3W3niOOGNSZzUPJlvolOWc1lRB2dMhc3g,9212
|
2
2
|
ScriptCollection/Executables.py,sha256=xWXG2lKx82y697vFDC3EsG1K3FqyX1Fo0bnfLSXIY1A,38282
|
3
|
-
ScriptCollection/GeneralUtilities.py,sha256=
|
3
|
+
ScriptCollection/GeneralUtilities.py,sha256=DKOgfpqKyxEvtoo_ncxGivtrqrQyF8J2S9vYBnSdaS8,48731
|
4
4
|
ScriptCollection/ImageUpdater.py,sha256=qTe3yoqzQJY7LZdXBbjbWvrsSQaeHy1VwmOxaRzU2ig,29305
|
5
5
|
ScriptCollection/ProcessesRunner.py,sha256=3mu4ZxzZleQo0Op6o9EYTCFiJfb6kx5ov2YfZfT89mU,1395
|
6
6
|
ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4bQNM6RV6Y,2480
|
7
7
|
ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
|
8
8
|
ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
|
9
9
|
ScriptCollection/SCLog.py,sha256=rMdrEzBKQZBdObPJ9nZ5XCEXRoIFqPh8fAoiX6ZOVuw,4493
|
10
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
11
|
-
ScriptCollection/TasksForCommonProjectStructure.py,sha256=
|
10
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=7axjJZ3kMYVeO4dvOINbIf-W9CRZs2SGIWn1_hRjyPI,141742
|
11
|
+
ScriptCollection/TasksForCommonProjectStructure.py,sha256=bVq2XIEz1Z8bXOW1WJIVN2YW9vMCcR2FCTuqEyzFG_I,250542
|
12
12
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
|
-
scriptcollection-3.5.
|
14
|
-
scriptcollection-3.5.
|
15
|
-
scriptcollection-3.5.
|
16
|
-
scriptcollection-3.5.
|
17
|
-
scriptcollection-3.5.
|
13
|
+
scriptcollection-3.5.162.dist-info/METADATA,sha256=lvHNFsWWWMeMxh4qeIH8mLPAGhiMlXBnuwPHaq_cv5o,7689
|
14
|
+
scriptcollection-3.5.162.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
15
|
+
scriptcollection-3.5.162.dist-info/entry_points.txt,sha256=EBRDrnGDURysHNyK0Z0fPCnL7uCCO_Mxc6WYJ47KxAI,4234
|
16
|
+
scriptcollection-3.5.162.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
17
|
+
scriptcollection-3.5.162.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|