ScriptCollection 4.0.14__py3-none-any.whl → 4.0.16__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.
@@ -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 = "4.0.14"
39
+ version = "4.0.16"
40
40
  __version__ = version
41
41
 
42
42
 
@@ -40,10 +40,7 @@ class TFCPS_CodeUnitSpecific_Python_Functions(TFCPS_CodeUnitSpecific_Base):
40
40
 
41
41
  GeneralUtilities.ensure_file_exists(bom_file_json)
42
42
  GeneralUtilities.write_text_to_file(bom_file_json, result[1])
43
- self.tfcps_Tools_General.ensure_cyclonedxcli_is_available(repository_folder,not self.use_cache())
44
- cyclonedx_exe ="cyclonedx-cli"# cyclonedx_exe = os.path.join(repository_folder, "Other/Resources/CycloneDXCLI/cyclonedx-cli")
45
- #if GeneralUtilities.current_system_is_windows():
46
- # cyclonedx_exe = cyclonedx_exe+".exe"
43
+ cyclonedx_exe=self.tfcps_Tools_General.ensure_cyclonedxcli_is_available(repository_folder,not self.use_cache())
47
44
  self._protected_sc.run_program(cyclonedx_exe, f"convert --input-file ./{codeunitname}/{bom_file_relative_json} --input-format json --output-file ./{codeunitname}/{bom_file_relative_xml} --output-format xml", repository_folder)
48
45
  self._protected_sc.format_xml_file(bom_file_xml)
49
46
  GeneralUtilities.ensure_file_does_not_exist(bom_file_json)
@@ -59,7 +59,7 @@ class TFCPS_MergeToStable:
59
59
  @GeneralUtilities.check_arguments
60
60
  def merge_to_stable_branch(self):
61
61
  self.sc.log.loglevel=self.createRelease_configuration.log_level
62
- self.sc.log.log("Merge to stable-branch...")
62
+ self.sc.log.log("Merge to stable-branch...")
63
63
  product_name:str=self.createRelease_configuration.product_name
64
64
 
65
65
  GeneralUtilities.assert_condition(self.sc.git_get_commit_id(self.createRelease_configuration.repository,self.createRelease_configuration.source_branch)!=self.sc.git_get_commit_id(self.createRelease_configuration.repository,self.createRelease_configuration.target_branch),"Source- and target-branch must not be the same commit.")
@@ -130,8 +130,9 @@ class TFCPS_MergeToStable:
130
130
 
131
131
  self.sc.assert_no_uncommitted_changes(self.createRelease_configuration.repository)
132
132
  self.sc.assert_no_uncommitted_changes(self.createRelease_configuration.reference_repo)
133
- self.sc.assert_no_uncommitted_changes(self.createRelease_configuration.build_repo)
133
+ self.sc.git_commit(self.createRelease_configuration.build_repo,"Updated submodules")
134
134
 
135
+ self.sc.git_push_with_retry(self.createRelease_configuration.repository,self.createRelease_configuration.common_remote_name,self.createRelease_configuration.source_branch,self.createRelease_configuration.source_branch)
135
136
  self.sc.git_push_with_retry(self.createRelease_configuration.repository,self.createRelease_configuration.common_remote_name,self.createRelease_configuration.target_branch,self.createRelease_configuration.target_branch)
136
137
  self.sc.git_push_with_retry(self.createRelease_configuration.build_repo,self.createRelease_configuration.build_repo_remote_name,self.createRelease_configuration.build_repo_main_branch_name,self.createRelease_configuration.build_repo_main_branch_name)
137
138
  self.sc.git_push_with_retry(self.createRelease_configuration.reference_repo,self.createRelease_configuration.reference_remote_name,self.createRelease_configuration.reference_repo_main_branch_name,self.createRelease_configuration.reference_repo_main_branch_name)
@@ -7,7 +7,6 @@ import zipfile
7
7
  import tarfile
8
8
  import re
9
9
  import sys
10
- import traceback
11
10
  import json
12
11
  import tempfile
13
12
  import uuid
@@ -27,71 +26,66 @@ class TFCPS_Tools_General:
27
26
  def __init__(self,sc:ScriptCollectionCore):
28
27
  self.__sc=sc
29
28
 
29
+
30
+ def get_global_cache_folder(self)->str:
31
+ user_folder = str(Path.home())
32
+ global_cache_folder = os.path.join(user_folder, ".scriptcollection", "GlobalCache")
33
+ GeneralUtilities.ensure_directory_exists(global_cache_folder)
34
+ return global_cache_folder
35
+
30
36
  @GeneralUtilities.check_arguments
31
37
  def codeunit_is_enabled(self, codeunit_file: str) -> bool:
32
38
  root: etree._ElementTree = etree.parse(codeunit_file)
33
39
  return GeneralUtilities.string_to_boolean(str(root.xpath('//cps:codeunit/@enabled', namespaces={'cps': 'https://projects.aniondev.de/PublicProjects/Common/ProjectTemplates/-/tree/main/Conventions/RepositoryStructure/CommonProjectStructure'})[0]))
34
40
 
35
41
  @GeneralUtilities.check_arguments
36
- def ensure_cyclonedxcli_is_available(self, target_folder: str,enforce_update:bool) -> None:
37
- if shutil.which("cyclonedx-cli") is None:
38
- local_filename = "cyclonedx-cli"
39
- filename_on_github: str
40
- if GeneralUtilities.current_system_is_windows():
41
- filename_on_github = "cyclonedx-win-x64.exe"
42
- local_filename = local_filename+".exe"
43
- else:
44
- filename_on_github = "cyclonedx-linux-x64"
45
- self.ensure_file_from_github_assets_is_available_with_retry(target_folder, "CycloneDX", "cyclonedx-cli", "CycloneDXCLI", local_filename, lambda latest_version: filename_on_github,enforce_update=False)
42
+ def ensure_cyclonedxcli_is_available(self, target_folder: str,enforce_update:bool) -> str:
43
+ local_filename = "cyclonedx-cli"
44
+ filename_on_github: str
45
+ if GeneralUtilities.current_system_is_windows():
46
+ filename_on_github = "cyclonedx-win-x64.exe"
47
+ local_filename = local_filename+".exe"
48
+ else:
49
+ filename_on_github = "cyclonedx-linux-x64"
50
+ return self.ensure_file_from_github_assets_is_available_with_retry(target_folder, "CycloneDX", "cyclonedx-cli", "CycloneDXCLI", local_filename, lambda latest_version: filename_on_github,enforce_update=False)
51
+
46
52
  @GeneralUtilities.check_arguments
47
- def ensure_file_from_github_assets_is_available_with_retry(self, target_folder: str, githubuser: str, githubprojectname: str, resource_name: str, local_filename: str, get_filename_on_github, amount_of_attempts: int = 5,enforce_update:bool=False) -> None:
48
- GeneralUtilities.retry_action(lambda: self.ensure_file_from_github_assets_is_available(target_folder, githubuser, githubprojectname, resource_name, local_filename, get_filename_on_github,enforce_update), amount_of_attempts)
53
+ def ensure_file_from_github_assets_is_available_with_retry(self, target_folder: str, githubuser: str, githubprojectname: str, resource_name: str, local_filename: str, get_filename_on_github, amount_of_attempts: int = 5,enforce_update:bool=False) -> str:
54
+ return GeneralUtilities.retry_action(lambda: self.ensure_file_from_github_assets_is_available(target_folder, githubuser, githubprojectname, resource_name, local_filename, get_filename_on_github,enforce_update), amount_of_attempts)
49
55
 
50
56
  @GeneralUtilities.check_arguments
51
- def ensure_file_from_github_assets_is_available(self, target_folder: str, githubuser: str, githubprojectname: str, resource_name: str, local_filename: str, get_filename_on_github,enforce_update:bool) -> None:
52
- resource_folder = os.path.join(target_folder, "Other", "Resources", resource_name)
53
- internet_connection_is_available = GeneralUtilities.internet_connection_is_available()
57
+ def ensure_file_from_github_assets_is_available(self, target_folder: str, githubuser: str, githubprojectname: str, resource_name: str, local_filename: str, get_filename_on_github,enforce_update:bool) -> str:
58
+ resource_folder =os.path.join( self.get_global_cache_folder(),"Tools",resource_name)
54
59
  file = f"{resource_folder}/{local_filename}"
55
60
  file_exists = os.path.isfile(file)
56
- if internet_connection_is_available: # Load/Update
57
- try:
58
- if enforce_update or not file_exists:
59
- self.__sc.log.log(f"Download Asset \"{githubuser}/{githubprojectname}: {resource_name}\" from GitHub...", LogLevel.Debug)
60
- GeneralUtilities.ensure_directory_does_not_exist(resource_folder)
61
- GeneralUtilities.ensure_directory_exists(resource_folder)
62
- headers = {'Cache-Control': 'no-cache', 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.96 Safari/537.36'}
63
- self.__add_github_api_key_if_available(headers)
64
- url = f"https://api.github.com/repos/{githubuser}/{githubprojectname}/releases/latest"
65
- self.__sc.log.log(f"Download \"{url}\"...", LogLevel.Debug)
66
- response = requests.get(url, headers=headers, allow_redirects=True, timeout=(10, 10))
67
- latest_version = response.json()["tag_name"]
68
- filename_on_github = get_filename_on_github(latest_version)
69
- link = f"https://github.com/{githubuser}/{githubprojectname}/releases/download/{latest_version}/{filename_on_github}"
70
- with requests.get(link, headers=headers, stream=True, allow_redirects=True, timeout=(5, 300)) as r:
71
- r.raise_for_status()
72
- total_size = int(r.headers.get("Content-Length", 0))
73
- downloaded = 0
74
- with open(file, "wb") as f:
75
- for chunk in r.iter_content(chunk_size=8192):
76
- f.write(chunk)
77
- show_progress: bool = False
78
- if show_progress:
79
- downloaded += len(chunk)
80
- if total_size:
81
- percent = downloaded / total_size * 100
82
- sys.stdout.write(f"\rDownload: {percent:.2f}%")
83
- sys.stdout.flush()
84
- self.__sc.log.log(f"Downloaded \"{url}\".", LogLevel.Diagnostic)
85
- except Exception as e:
86
- if file_exists:
87
- self.__sc.log.log_exception(f"Can not update {resource_name}", e,traceback,LogLevel.Warning)
88
- else:
89
- raise
90
- else:
91
- if file_exists:
92
- self.__sc.log.log(f"Can not check for updates of {resource_name} due to missing internet-connection.", LogLevel.Warning)
93
- else:
94
- raise ValueError(f"Can not download {resource_name}.")
61
+ if not file_exists:
62
+ self.__sc.log.log(f"Download Asset \"{githubuser}/{githubprojectname}: {resource_name}\" from GitHub to global cache...", LogLevel.Information)
63
+ GeneralUtilities.ensure_folder_exists_and_is_empty(resource_folder)
64
+ headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.5845.96 Safari/537.36'}
65
+ self.__add_github_api_key_if_available(headers)
66
+ url = f"https://api.github.com/repos/{githubuser}/{githubprojectname}/releases/latest"
67
+ self.__sc.log.log(f"Download \"{url}\"...", LogLevel.Debug)
68
+ response = requests.get(url, headers=headers, allow_redirects=True, timeout=(10, 10))
69
+ latest_version = response.json()["tag_name"]
70
+ filename_on_github = get_filename_on_github(latest_version)
71
+ link = f"https://github.com/{githubuser}/{githubprojectname}/releases/download/{latest_version}/{filename_on_github}"
72
+ with requests.get(link, headers=headers, stream=True, allow_redirects=True, timeout=(5, 300)) as r:
73
+ r.raise_for_status()
74
+ total_size = int(r.headers.get("Content-Length", 0))
75
+ downloaded = 0
76
+ with open(file, "wb") as f:
77
+ for chunk in r.iter_content(chunk_size=8192):
78
+ f.write(chunk)
79
+ show_progress: bool = False
80
+ if show_progress:
81
+ downloaded += len(chunk)
82
+ if total_size:
83
+ percent = downloaded / total_size * 100
84
+ sys.stdout.write(f"\rDownload: {percent:.2f}%")
85
+ sys.stdout.flush()
86
+ self.__sc.log.log(f"Downloaded \"{url}\".", LogLevel.Diagnostic)
87
+ GeneralUtilities.assert_file_exists(file)
88
+ return file
95
89
 
96
90
  def __add_github_api_key_if_available(self, headers: dict):
97
91
  token = os.getenv("GITHUB_TOKEN")
@@ -452,10 +446,7 @@ class TFCPS_Tools_General:
452
446
  target_original_sbom_file_relative = os.path.dirname(target_sbom_file_relative)+"/"+os.path.basename(target_sbom_file_relative)+".original.xml"
453
447
  os.rename(os.path.join(repository_folder, target_sbom_file_relative), os.path.join(repository_folder, target_original_sbom_file_relative))
454
448
 
455
- self.ensure_cyclonedxcli_is_available(repository_folder,not use_cache)
456
- cyclonedx_exe ="cyclonedx-cli"# os.path.join(repository_folder, "Other/Resources/CycloneDXCLI/cyclonedx-cli")
457
- #if GeneralUtilities.current_system_is_windows():
458
- # cyclonedx_exe = cyclonedx_exe+".exe"
449
+ cyclonedx_exe:str=self.ensure_cyclonedxcli_is_available(repository_folder,not use_cache)
459
450
  self.__sc.run_program(cyclonedx_exe, f"merge --input-files {source_sbom_file_relative} {target_original_sbom_file_relative} --output-file {target_sbom_file_relative}", repository_folder)
460
451
  GeneralUtilities.ensure_file_does_not_exist(os.path.join(repository_folder, target_original_sbom_file_relative))
461
452
  self.__sc.format_xml_file(os.path.join(repository_folder, target_sbom_file_relative))
@@ -492,30 +483,28 @@ class TFCPS_Tools_General:
492
483
  def generate_svg_files_from_plantuml_files_for_repository(self, repository_folder: str,use_cache:bool) -> None:
493
484
  self.__sc.log.log("Generate svg-files from plantuml-files...")
494
485
  self.__sc.assert_is_git_repository(repository_folder)
495
- self.ensure_plantuml_is_available(repository_folder,not use_cache)
496
- plant_uml_folder = os.path.join(repository_folder, "Other", "Resources", "PlantUML")
486
+ plantuml_jar_file=self.ensure_plantuml_is_available(repository_folder,not use_cache)
497
487
  target_folder = os.path.join(repository_folder, "Other", "Reference")
498
- self.__generate_svg_files_from_plantuml(target_folder, plant_uml_folder)
488
+ self.__generate_svg_files_from_plantuml(target_folder, plantuml_jar_file)
499
489
 
500
490
  @GeneralUtilities.check_arguments
501
491
  def generate_svg_files_from_plantuml_files_for_codeunit(self, codeunit_folder: str,use_cache:bool) -> None:
502
492
  self.assert_is_codeunit_folder(codeunit_folder)
503
493
  repository_folder = os.path.dirname(codeunit_folder)
504
- self.ensure_plantuml_is_available(repository_folder,not use_cache)
505
- plant_uml_folder = os.path.join(repository_folder, "Other", "Resources", "PlantUML")
494
+ plantuml_jar_file=self.ensure_plantuml_is_available(repository_folder,not use_cache)
506
495
  target_folder = os.path.join(codeunit_folder, "Other", "Reference")
507
- self.__generate_svg_files_from_plantuml(target_folder, plant_uml_folder)
496
+ self.__generate_svg_files_from_plantuml(target_folder, plantuml_jar_file)
508
497
 
509
498
  @GeneralUtilities.check_arguments
510
- def ensure_plantuml_is_available(self, target_folder: str,enforce_update:bool) -> None:
511
- self.ensure_file_from_github_assets_is_available_with_retry(target_folder, "plantuml", "plantuml", "PlantUML", "plantuml.jar", lambda latest_version: "plantuml.jar",enforce_update=enforce_update)
499
+ def ensure_plantuml_is_available(self, target_folder: str,enforce_update:bool) -> str:
500
+ return self.ensure_file_from_github_assets_is_available_with_retry(target_folder, "plantuml", "plantuml", "PlantUML", "plantuml.jar", lambda latest_version: "plantuml.jar",enforce_update=enforce_update)
512
501
 
513
502
  @GeneralUtilities.check_arguments
514
- def __generate_svg_files_from_plantuml(self, diagrams_files_folder: str, plant_uml_folder: str) -> None:
503
+ def __generate_svg_files_from_plantuml(self, diagrams_files_folder: str, plantuml_jar_file: str) -> None:
515
504
  for file in GeneralUtilities.get_all_files_of_folder(diagrams_files_folder):
516
505
  if file.endswith(".plantuml"):
517
506
  output_filename = self.get_output_filename_for_plantuml_filename(file)
518
- argument = ['-jar', f'{plant_uml_folder}/plantuml.jar', '-tsvg', os.path.basename(file)]
507
+ argument = ['-jar',plantuml_jar_file, '-tsvg', os.path.basename(file)]
519
508
  folder = os.path.dirname(file)
520
509
  self.__sc.run_program_argsasarray("java", argument, folder)
521
510
  result_file = folder+"/" + output_filename
@@ -636,8 +625,8 @@ class TFCPS_Tools_General:
636
625
  self.__sc.run_program("scgeneratetasksfilefromworkspacefile", f"--repositoryfolder {repository_folder}")
637
626
 
638
627
  @GeneralUtilities.check_arguments
639
- def ensure_androidappbundletool_is_available(self, target_folder: str,enforce_update:bool) -> None:
640
- self.ensure_file_from_github_assets_is_available_with_retry(target_folder, "google", "bundletool", "AndroidAppBundleTool", "bundletool.jar", lambda latest_version: f"bundletool-all-{latest_version}.jar",enforce_update=enforce_update)
628
+ def ensure_androidappbundletool_is_available(self, target_folder: str,enforce_update:bool) -> str:
629
+ return self.ensure_file_from_github_assets_is_available_with_retry(target_folder, "google", "bundletool", "AndroidAppBundleTool", "bundletool.jar", lambda latest_version: f"bundletool-all-{latest_version}.jar",enforce_update=enforce_update)
641
630
 
642
631
  @GeneralUtilities.check_arguments
643
632
  def ensure_mediamtx_is_available(self, target_folder: str,enforce_update:bool) -> None:
@@ -812,7 +801,7 @@ class TFCPS_Tools_General:
812
801
 
813
802
  @GeneralUtilities.check_arguments
814
803
  def t4_transform(self, codeunit_folder: str, ignore_git_ignored_files: bool ,use_cache:bool):
815
- self.__ensure_grylibrary_is_available(codeunit_folder,use_cache)
804
+ grylib_dll:str=self.__ensure_grylibrary_is_available(use_cache)
816
805
  repository_folder: str = os.path.dirname(codeunit_folder)
817
806
  codeunitname: str = os.path.basename(codeunit_folder)
818
807
  codeunit_folder = os.path.join(repository_folder, codeunitname)
@@ -821,43 +810,36 @@ class TFCPS_Tools_General:
821
810
  relative_path_to_tt_file_from_repository = str(Path(tt_file).relative_to(repository_folder))
822
811
  if (not ignore_git_ignored_files) or (ignore_git_ignored_files and not self.__sc.file_is_git_ignored(relative_path_to_tt_file_from_repository, repository_folder)):
823
812
  relative_path_to_tt_file_from_codeunit_file = str(Path(tt_file).relative_to(codeunit_folder))
824
- argument = [f"--parameter=repositoryFolder={repository_folder}", f"--parameter=codeUnitName={codeunitname}", relative_path_to_tt_file_from_codeunit_file]
813
+ argument = [f"--parameter=repositoryFolder={repository_folder}", f"--parameter=codeUnitName={codeunitname}", f"--parameter=gryLibraryDLLFile={grylib_dll}", relative_path_to_tt_file_from_codeunit_file]
825
814
  self.__sc.run_program_argsasarray("t4", argument, codeunit_folder)
826
815
 
827
816
  @GeneralUtilities.check_arguments
828
- def __ensure_grylibrary_is_available(self, codeunit_folder: str,use_cache:bool) -> None:
829
- grylibrary_folder = os.path.join(codeunit_folder, "Other", "Resources", "GRYLibrary")
817
+ def __ensure_grylibrary_is_available(self, use_cache:bool) -> None:
818
+ grylibrary_folder =os.path.join( self.get_global_cache_folder(),"Tools","GRYLibrary")
830
819
  grylibrary_dll_file = os.path.join(grylibrary_folder, "BuildResult_DotNet_win-x64", "GRYLibrary.dll")
831
- internet_connection_is_available = GeneralUtilities.internet_connection_is_available()
832
820
  grylibrary_dll_file_exists = os.path.isfile(grylibrary_dll_file)
833
- update:bool=(not grylibrary_dll_file_exists) or (not use_cache)
834
- if update:
835
- if internet_connection_is_available: # Load/Update GRYLibrary
836
- self.__sc.log("Download GRYLibrary...",LogLevel.Debug)
837
- grylibrary_latest_codeunit_file = "https://raw.githubusercontent.com/anionDev/GRYLibrary/stable/GRYLibrary/GRYLibrary.codeunit.xml"
838
- with urllib.request.urlopen(grylibrary_latest_codeunit_file) as url_result:
839
- grylibrary_latest_version = self.get_version_of_codeunit_filecontent(url_result.read().decode("utf-8"))
840
- if grylibrary_dll_file_exists:
841
- grylibrary_existing_codeunit_file = os.path.join(grylibrary_folder, "SourceCode", "GRYLibrary.codeunit.xml")
842
- grylibrary_existing_codeunit_version = self.get_version_of_codeunit(grylibrary_existing_codeunit_file)
843
- if grylibrary_existing_codeunit_version != grylibrary_latest_version:
844
- GeneralUtilities.ensure_directory_does_not_exist(grylibrary_folder)
845
- if not os.path.isfile(grylibrary_dll_file):
821
+ if not os.path.isfile(grylibrary_dll_file):
822
+ self.__sc.log("Download GRYLibrary to global cache...",LogLevel.Information)
823
+ grylibrary_latest_codeunit_file = "https://raw.githubusercontent.com/anionDev/GRYLibrary/stable/GRYLibrary/GRYLibrary.codeunit.xml"
824
+ with urllib.request.urlopen(grylibrary_latest_codeunit_file) as url_result:
825
+ grylibrary_latest_version = self.get_version_of_codeunit_filecontent(url_result.read().decode("utf-8"))
826
+ if grylibrary_dll_file_exists:
827
+ grylibrary_existing_codeunit_file = os.path.join(grylibrary_folder, "SourceCode", "GRYLibrary.codeunit.xml")
828
+ grylibrary_existing_codeunit_version = self.get_version_of_codeunit(grylibrary_existing_codeunit_file)
829
+ if grylibrary_existing_codeunit_version != grylibrary_latest_version:
846
830
  GeneralUtilities.ensure_directory_does_not_exist(grylibrary_folder)
847
- GeneralUtilities.ensure_directory_exists(grylibrary_folder)
848
- archive_name = f"GRYLibrary.v{grylibrary_latest_version}.Productive.Artifacts.zip"
849
- archive_download_link = f"https://github.com/anionDev/GRYLibrary/releases/download/v{grylibrary_latest_version}/{archive_name}"
850
- archive_file = os.path.join(grylibrary_folder, archive_name)
851
- urllib.request.urlretrieve(archive_download_link, archive_file)
852
- with zipfile.ZipFile(archive_file, 'r') as zip_ref:
853
- zip_ref.extractall(grylibrary_folder)
854
- GeneralUtilities.ensure_file_does_not_exist(archive_file)
855
- else:
856
- if grylibrary_dll_file_exists:
857
- self.__sc.log.log("Can not check for updates of GRYLibrary due to missing internet-connection.")
858
- else:
859
- raise ValueError("Can not download GRYLibrary.")
860
-
831
+ GeneralUtilities.ensure_directory_does_not_exist(grylibrary_folder)
832
+ GeneralUtilities.ensure_directory_exists(grylibrary_folder)
833
+ archive_name = f"GRYLibrary.v{grylibrary_latest_version}.Productive.Artifacts.zip"
834
+ archive_download_link = f"https://github.com/anionDev/GRYLibrary/releases/download/v{grylibrary_latest_version}/{archive_name}"
835
+ archive_file = os.path.join(grylibrary_folder, archive_name)
836
+ urllib.request.urlretrieve(archive_download_link, archive_file)
837
+ with zipfile.ZipFile(archive_file, 'r') as zip_ref:
838
+ zip_ref.extractall(grylibrary_folder)
839
+ GeneralUtilities.ensure_file_does_not_exist(archive_file)
840
+ GeneralUtilities.assert_file_exists(grylibrary_dll_file)
841
+ return grylibrary_dll_file
842
+
861
843
  @GeneralUtilities.check_arguments
862
844
  def ensure_ffmpeg_is_available(self, codeunit_folder: str,use_cache:bool) -> None:
863
845
  self.assert_is_codeunit_folder(codeunit_folder)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ScriptCollection
3
- Version: 4.0.14
3
+ Version: 4.0.16
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
@@ -9,7 +9,7 @@ ScriptCollection/ProgramRunnerEpew.py,sha256=TJdDx9zIMSiCaXh8X-ekrMlbXfGtmd0Mmyx
9
9
  ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrRjAPIwT5Y,37
10
10
  ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
11
11
  ScriptCollection/SCLog.py,sha256=dxGOI4E9lG5v9jk_LajXCkM5nghliCDV8YB8Ihn160s,4541
12
- ScriptCollection/ScriptCollectionCore.py,sha256=O0lDSOUHSfyjE3CqjJradeGEQFM86vQs-7WXHpTOMj4,140490
12
+ ScriptCollection/ScriptCollectionCore.py,sha256=K8SA6_gxhxZ0fU7Wh9lhAakQBP8aPpnPjn-nd9Y-z6E,140490
13
13
  ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  ScriptCollection/TFCPS/TFCPS_CodeUnitSpecific_Base.py,sha256=RuUmppxfmH1zvfP6n2KFtlQdg8POzmkNMqkQCI1MSOc,25817
15
15
  ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnit.py,sha256=mE6l0LsGMOI6IAD0B6iRbpD6QAGBsLmZ_jrtubRap7g,7225
@@ -17,9 +17,9 @@ ScriptCollection/TFCPS/TFCPS_CodeUnit_BuildCodeUnits.py,sha256=E40vZV3SisbatAXik
17
17
  ScriptCollection/TFCPS/TFCPS_CreateRelease.py,sha256=GfyeOjgluMLCc3FbcxyKp5GoT5e9TKM8MJwM7LjEw8s,6460
18
18
  ScriptCollection/TFCPS/TFCPS_Generic.py,sha256=O-0guM_LJCcZmPZJhMgTvXD2RXUJEBWWv6Bt6hDFhvM,1943
19
19
  ScriptCollection/TFCPS/TFCPS_MergeToMain.py,sha256=9RXZ-PLO-uI8-CeRrQlpHowwF8sxDEi8nMzLZrs5TiA,7564
20
- ScriptCollection/TFCPS/TFCPS_MergeToStable.py,sha256=zHzvR5Lzrm-mxeaKj-ohSoozujaluLeZz8EvMHQkshA,22422
20
+ ScriptCollection/TFCPS/TFCPS_MergeToStable.py,sha256=AUM6hJDYmFzcP4wCwrn2htf3fTBK9mstxnLWWHaxxPE,22652
21
21
  ScriptCollection/TFCPS/TFCPS_Tools_Dependencies.py,sha256=o7HI3ki3WWqlAiUsrh3Lky_w6UhYh9hdjYPGOhubQGA,414
22
- ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=rByLHNwQvMb3jJEUIzjt6LN_Fx9L40Y_vwcBR27NwjA,67668
22
+ ScriptCollection/TFCPS/TFCPS_Tools_General.py,sha256=QsywKFqRQBHflDISwwRvLuP3JppNxHzhhuKS3ThPMm4,66111
23
23
  ScriptCollection/TFCPS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  ScriptCollection/TFCPS/Docker/TFCPS_CodeUnitSpecific_Docker.py,sha256=so8NqH5qUkmrP7hdsoJ4FVFZhuy3h9zpAgczzpvTlfQ,5212
25
25
  ScriptCollection/TFCPS/Docker/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -32,10 +32,10 @@ ScriptCollection/TFCPS/Flutter/TFCPS_CodeUnitSpecific_Flutter.py,sha256=4Fd5aNac
32
32
  ScriptCollection/TFCPS/Flutter/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
33
  ScriptCollection/TFCPS/NodeJS/TFCPS_CodeUnitSpecific_NodeJS.py,sha256=80L0lRWoh6QZK4K4qIsoeXUT7za0miMYLG55pP2Abq0,6208
34
34
  ScriptCollection/TFCPS/NodeJS/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
35
- ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=SHo2hI6DOlCPMfzIFrFGRKkEIhNyc61Lm67MioqCGnA,7049
35
+ ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=vUt2CbjS0N10dr7OVDxppXvZmuiEsB_E7dkpZErOYQY,6821
36
36
  ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
- scriptcollection-4.0.14.dist-info/METADATA,sha256=vwCztFySXijzGxOGAS9zA814rF62HTCdHrVmNYh8EjE,7688
38
- scriptcollection-4.0.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
39
- scriptcollection-4.0.14.dist-info/entry_points.txt,sha256=EBRDrnGDURysHNyK0Z0fPCnL7uCCO_Mxc6WYJ47KxAI,4234
40
- scriptcollection-4.0.14.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
41
- scriptcollection-4.0.14.dist-info/RECORD,,
37
+ scriptcollection-4.0.16.dist-info/METADATA,sha256=35wCl7wyOZ9O53zIRjyjYC9GyFl-20QVm57G-m2FWPs,7688
38
+ scriptcollection-4.0.16.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
39
+ scriptcollection-4.0.16.dist-info/entry_points.txt,sha256=EBRDrnGDURysHNyK0Z0fPCnL7uCCO_Mxc6WYJ47KxAI,4234
40
+ scriptcollection-4.0.16.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
41
+ scriptcollection-4.0.16.dist-info/RECORD,,