ScriptCollection 3.5.104__py3-none-any.whl → 3.5.105__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.
@@ -33,7 +33,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
33
33
  from .ProgramRunnerPopen import ProgramRunnerPopen
34
34
  from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument
35
35
 
36
- version = "3.5.104"
36
+ version = "3.5.105"
37
37
  __version__ = version
38
38
 
39
39
 
@@ -1868,7 +1868,8 @@ DNS = {domain}
1868
1868
  self.run_program_argsasarray("openssl", ['pkcs12', '-export', '-out', f'{filename}.pfx', f'-inkey', f'{filename}.key', '-in', f'{filename}.crt', '-password', f'pass:{password}'], folder)
1869
1869
 
1870
1870
  @GeneralUtilities.check_arguments
1871
- def update_dependencies_of_python_in_requirementstxt_file(self, file: str, verbosity: int):
1871
+ def update_dependencies_of_python_in_requirementstxt_file(self, file: str,ignored_dependencies:list[str], verbosity: int):
1872
+ #TODO consider ignored_dependencies
1872
1873
  lines = GeneralUtilities.read_lines_from_file(file)
1873
1874
  new_lines = []
1874
1875
  for line in lines:
@@ -1898,7 +1899,8 @@ DNS = {domain}
1898
1899
  raise ValueError(f'Unexpected line in requirements-file: "{line}"')
1899
1900
 
1900
1901
  @GeneralUtilities.check_arguments
1901
- def update_dependencies_of_python_in_setupcfg_file(self, setup_cfg_file: str, verbosity: int):
1902
+ def update_dependencies_of_python_in_setupcfg_file(self, setup_cfg_file: str,ignored_dependencies:list[str], verbosity: int):
1903
+ #TODO consider ignored_dependencies
1902
1904
  lines = GeneralUtilities.read_lines_from_file(setup_cfg_file)
1903
1905
  new_lines = []
1904
1906
  requirement_parsing_mode = False
@@ -2277,3 +2279,6 @@ TXDX
2277
2279
  element = ET.XML(GeneralUtilities.read_text_from_file(file, encoding))
2278
2280
  ET.indent(element)
2279
2281
  GeneralUtilities.write_text_to_file(file, ET.tostring(element, encoding="unicode"), encoding)
2282
+
2283
+ def install_requirementstxt_file(self,requirements_txt_file: str, folder: str, verbosity: int):
2284
+ self.run_program_argsasarray("pip", ["install", "-r", requirements_txt_file], folder, verbosity=verbosity)
@@ -1560,6 +1560,9 @@ class TasksForCommonProjectStructure:
1560
1560
  combined_file = os.path.join(codeunit_folder, file)
1561
1561
  if not os.path.isfile(combined_file):
1562
1562
  raise ValueError(f'The mandatory file "{file}" does not exist in the codeunit-folder.')
1563
+
1564
+ if os.path.isfile(os.path.join(codeunit_folder,"Other","requirements.txt")):
1565
+ self.install_requirementstxt_for_codeunit(codeunit_folder,verbosity)
1563
1566
 
1564
1567
  # Check developer
1565
1568
  if self.validate_developers_of_repository:
@@ -2264,16 +2267,32 @@ class TasksForCommonProjectStructure:
2264
2267
  ignored_dependencies = self.get_dependencies_which_are_ignored_from_updates(codeunit_folder, True)
2265
2268
  # TODO implement
2266
2269
 
2270
+ @GeneralUtilities.check_arguments
2271
+ def update_dependencies_of_typical_python_repository_requirements(self, repository_folder: str, verbosity: int, cmd_args: list[str]) -> None:
2272
+ verbosity = self.get_verbosity_from_commandline_arguments(cmd_args, verbosity)
2273
+
2274
+ development_requirements_file = os.path.join(repository_folder, "Other","requirements.txt")
2275
+ if (os.path.isfile(development_requirements_file)):
2276
+ self.__sc.update_dependencies_of_python_in_requirementstxt_file(development_requirements_file,[], verbosity)
2277
+
2267
2278
  @GeneralUtilities.check_arguments
2268
2279
  def update_dependencies_of_typical_python_codeunit(self, update_script_file: str, verbosity: int, cmd_args: list[str]) -> None:
2269
2280
  codeunit_folder = GeneralUtilities.resolve_relative_path("..", os.path.dirname(update_script_file))
2270
2281
  ignored_dependencies = self.get_dependencies_which_are_ignored_from_updates(codeunit_folder, True)
2271
2282
  # TODO consider ignored_dependencies
2272
2283
  verbosity = self.get_verbosity_from_commandline_arguments(cmd_args, verbosity)
2273
- self.__sc.update_dependencies_of_python_in_setupcfg_file(os.path.join(codeunit_folder, "setup.cfg"), verbosity)
2274
- development_requirements_file = os.path.join(codeunit_folder, "requirements.txt")
2284
+
2285
+ setup_cfg=os.path.join(codeunit_folder, "setup.cfg")
2286
+ if (os.path.isfile(setup_cfg)):
2287
+ self.__sc.update_dependencies_of_python_in_setupcfg_file(setup_cfg,ignored_dependencies, verbosity)
2288
+
2289
+ development_requirements_file = os.path.join(codeunit_folder, "requirements.txt")#required for codeunits which contain python-code which need third-party dependencies
2275
2290
  if (os.path.isfile(development_requirements_file)):
2276
- self.__sc.update_dependencies_of_python_in_requirementstxt_file(development_requirements_file, verbosity)
2291
+ self.__sc.update_dependencies_of_python_in_requirementstxt_file(development_requirements_file,ignored_dependencies, verbosity)
2292
+
2293
+ development_requirements_file2 = os.path.join(codeunit_folder, "Other","requirements.txt")#required for codeunits which contain python-scripts which needs third-party dependencies
2294
+ if (os.path.isfile(development_requirements_file2)):
2295
+ self.__sc.update_dependencies_of_python_in_requirementstxt_file(development_requirements_file2, ignored_dependencies,verbosity)
2277
2296
 
2278
2297
  @GeneralUtilities.check_arguments
2279
2298
  def update_dependencies_of_typical_dotnet_codeunit(self, update_script_file: str, verbosity: int, cmd_args: list[str]) -> None:
@@ -3271,3 +3290,11 @@ class TasksForCommonProjectStructure:
3271
3290
  self.__sc.git_checkout(ref_repo, update_http_documentation_arguments.main_branch_name)
3272
3291
  self.__sc.git_push_with_retry(ref_repo, update_http_documentation_arguments.common_remote_name, update_http_documentation_arguments.main_branch_name, update_http_documentation_arguments.main_branch_name)
3273
3292
  self.__sc.git_commit(GeneralUtilities.resolve_relative_path("../..", folder_of_this_file), f"Updated content of {update_http_documentation_arguments.product_name} v{update_http_documentation_arguments.new_project_version} in {update_http_documentation_arguments.reference_repository_name}-submodule")
3293
+
3294
+ @GeneralUtilities.check_arguments
3295
+ def install_requirementstxt_for_codeunit(self,codeunit_folder:str,verbosity:int):
3296
+ self.__sc.install_requirementstxt_file(codeunit_folder+"/Other/requirements.txt", verbosity)
3297
+
3298
+ @GeneralUtilities.check_arguments
3299
+ def install_requirementstxt_for_repository(self, repository_folde: str,verbosity:int):
3300
+ self.__sc.install_requirementstxt_file(repository_folde+"/Other/requirements.txt", verbosity)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ScriptCollection
3
- Version: 3.5.104
3
+ Version: 3.5.105
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
@@ -28,7 +28,7 @@ Requires-Dist: cyclonedx-bom>=5.3.0
28
28
  Requires-Dist: defusedxml>=0.7.1
29
29
  Requires-Dist: keyboard>=0.13.5
30
30
  Requires-Dist: lcov-cobertura>=2.1.1
31
- Requires-Dist: lxml>=5.3.1
31
+ Requires-Dist: lxml>=5.3.2
32
32
  Requires-Dist: ntplib>=0.4.0
33
33
  Requires-Dist: Pillow>=11.1.0
34
34
  Requires-Dist: pycdlib>=1.14.0
@@ -5,12 +5,12 @@ ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4b
5
5
  ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
6
6
  ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
7
7
  ScriptCollection/SCLog.py,sha256=Gw27Oclcb0ten7_89PD5CdNMoO-at2hGUOYbF-x1HPQ,2296
8
- ScriptCollection/ScriptCollectionCore.py,sha256=08UGdNP-Ji04KIkoG_1Ks7EdbLlSpnM-dI0WBNMzrOc,125705
9
- ScriptCollection/TasksForCommonProjectStructure.py,sha256=4EcmpWaLxfJHPSW47EXeJivk4hypqPasgbX-joj9isE,229844
8
+ ScriptCollection/ScriptCollectionCore.py,sha256=U4kI7ztIm6_KL4FFRmway_y8QRrQiJgFEZTBzZ618Ys,126071
9
+ ScriptCollection/TasksForCommonProjectStructure.py,sha256=iemQ1J0UAengGAvCTJdc8-ipjhfLqf0Su8evQTDdLGU,231626
10
10
  ScriptCollection/UpdateCertificates.py,sha256=xRebqD2etBD7ILHL-7fg-Y-kPF0Tbmnwexv4FhwDntQ,7791
11
11
  ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- scriptcollection-3.5.104.dist-info/METADATA,sha256=oZ-T6ilqqw29o0VDog_vtgJvC7yYrKWd2Tm1PT_BDJE,7664
13
- scriptcollection-3.5.104.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
14
- scriptcollection-3.5.104.dist-info/entry_points.txt,sha256=fYCGWGNGijBQHhFe6UAO-BEpfEOxLyNJemukt5ElSzs,3644
15
- scriptcollection-3.5.104.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
16
- scriptcollection-3.5.104.dist-info/RECORD,,
12
+ scriptcollection-3.5.105.dist-info/METADATA,sha256=BK_ZzXAIr0w33y_eYM1aDhSh24Po6Mb26eXLacXe1ns,7664
13
+ scriptcollection-3.5.105.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
14
+ scriptcollection-3.5.105.dist-info/entry_points.txt,sha256=fYCGWGNGijBQHhFe6UAO-BEpfEOxLyNJemukt5ElSzs,3644
15
+ scriptcollection-3.5.105.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
16
+ scriptcollection-3.5.105.dist-info/RECORD,,