ScriptCollection 3.5.81__py3-none-any.whl → 3.5.82__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 +10 -0
- ScriptCollection/ScriptCollectionCore.py +36 -1
- ScriptCollection/TasksForCommonProjectStructure.py +7 -1
- {ScriptCollection-3.5.81.dist-info → ScriptCollection-3.5.82.dist-info}/METADATA +1 -1
- {ScriptCollection-3.5.81.dist-info → ScriptCollection-3.5.82.dist-info}/RECORD +8 -8
- {ScriptCollection-3.5.81.dist-info → ScriptCollection-3.5.82.dist-info}/WHEEL +0 -0
- {ScriptCollection-3.5.81.dist-info → ScriptCollection-3.5.82.dist-info}/entry_points.txt +0 -0
- {ScriptCollection-3.5.81.dist-info → ScriptCollection-3.5.82.dist-info}/top_level.txt +0 -0
|
@@ -943,11 +943,21 @@ class GeneralUtilities:
|
|
|
943
943
|
def assert_file_exists(file: str) -> str:
|
|
944
944
|
GeneralUtilities.assert_condition(os.path.isfile(file), f"File '{file}' does not exist.")
|
|
945
945
|
|
|
946
|
+
@staticmethod
|
|
947
|
+
@check_arguments
|
|
948
|
+
def assert_file_does_not_exist(file: str) -> str:
|
|
949
|
+
GeneralUtilities.assert_condition(not os.path.isfile(file), f"File '{file}' exists.")
|
|
950
|
+
|
|
946
951
|
@staticmethod
|
|
947
952
|
@check_arguments
|
|
948
953
|
def assert_folder_exists(folder: str) -> str:
|
|
949
954
|
GeneralUtilities.assert_condition(os.path.isdir(folder), f"Folder '{folder}' does not exist.")
|
|
950
955
|
|
|
956
|
+
@staticmethod
|
|
957
|
+
@check_arguments
|
|
958
|
+
def assert_folder_does_not_exist(folder: str) -> str:
|
|
959
|
+
GeneralUtilities.assert_condition(not os.path.isdir(folder), f"Folder '{folder}' exists.")
|
|
960
|
+
|
|
951
961
|
@staticmethod
|
|
952
962
|
@check_arguments
|
|
953
963
|
def retry_action(action, amount_of_attempts: int,action_name:str=None) -> None:
|
|
@@ -32,7 +32,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
|
|
|
32
32
|
from .ProgramRunnerPopen import ProgramRunnerPopen
|
|
33
33
|
from .ProgramRunnerEpew import ProgramRunnerEpew, CustomEpewArgument
|
|
34
34
|
|
|
35
|
-
version = "3.5.
|
|
35
|
+
version = "3.5.82"
|
|
36
36
|
__version__ = version
|
|
37
37
|
|
|
38
38
|
|
|
@@ -1826,6 +1826,41 @@ DNS = {domain}
|
|
|
1826
1826
|
GeneralUtilities.write_message_to_stdout(f"Update package {package_name}...")
|
|
1827
1827
|
self.run_program("dotnet", f"add {csproj_filename} package {package_name}", folder,print_errors_as_information=True)
|
|
1828
1828
|
|
|
1829
|
+
|
|
1830
|
+
@GeneralUtilities.check_arguments
|
|
1831
|
+
def dotnet_package_is_available(self,package_name:str,package_version:str,source:str):
|
|
1832
|
+
default_source_address="nuget.org"
|
|
1833
|
+
if source==default_source_address:
|
|
1834
|
+
GeneralUtilities.write_message_to_stdout(f"Wait until package {package_name} v{package_version} is available on {source}.")
|
|
1835
|
+
headers = {'Cache-Control': 'no-cache'}
|
|
1836
|
+
r=requests.get(f"https://api.{default_source_address}/v3-flatcontainer/{package_name.lower()}/{package_version}/{package_name.lower()}.nuspec", timeout=5,headers=headers)
|
|
1837
|
+
return r.status_code==200
|
|
1838
|
+
else:
|
|
1839
|
+
raise ValueError(f"dotnet_package_is_available is not implemented yet for other sources than {default_source_address}.")
|
|
1840
|
+
|
|
1841
|
+
@GeneralUtilities.check_arguments
|
|
1842
|
+
def wait_until_dotnet_package_is_available(self,package_name:str,package_version:str,source:str):
|
|
1843
|
+
while not self.dotnet_package_is_available(package_name,package_version,source):
|
|
1844
|
+
time.sleep(5)
|
|
1845
|
+
|
|
1846
|
+
|
|
1847
|
+
@GeneralUtilities.check_arguments
|
|
1848
|
+
def python_package_is_available(self,package_name:str,package_version:str,source:str):
|
|
1849
|
+
default_source_address="pypi.org"
|
|
1850
|
+
if source==default_source_address:
|
|
1851
|
+
GeneralUtilities.write_message_to_stdout(f"Wait until package {package_name} v{package_version} is available on {source}.")
|
|
1852
|
+
headers = {'Cache-Control': 'no-cache'}
|
|
1853
|
+
r=requests.get(f"https://{default_source_address}/pypi/{package_name}/{package_version}/json", timeout=5,headers=headers)
|
|
1854
|
+
return r.status_code==200
|
|
1855
|
+
else:
|
|
1856
|
+
raise ValueError(f"python_package_is_available is not implemented yet for other sources than {default_source_address}.")
|
|
1857
|
+
|
|
1858
|
+
@GeneralUtilities.check_arguments
|
|
1859
|
+
def python_until_dotnet_package_is_available(self,package_name:str,package_version:str,source:str):
|
|
1860
|
+
while not self.python_package_is_available(package_name,package_version,source):
|
|
1861
|
+
time.sleep(5)
|
|
1862
|
+
|
|
1863
|
+
|
|
1829
1864
|
@GeneralUtilities.check_arguments
|
|
1830
1865
|
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:
|
|
1831
1866
|
|
|
@@ -1948,10 +1948,16 @@ class TasksForCommonProjectStructure:
|
|
|
1948
1948
|
src_file_psw = os.path.join(src_folder, f"{codeunit_name}{certificate_resource_name}.password")
|
|
1949
1949
|
|
|
1950
1950
|
trg_folder = os.path.join(codeunit_folder, "Other", "Workspace", "Configuration", "Certificates")
|
|
1951
|
-
GeneralUtilities.ensure_directory_exists(trg_folder)
|
|
1952
1951
|
trg_file_pfx = os.path.join(trg_folder, f"{domain}.pfx")
|
|
1953
1952
|
trg_file_psw = os.path.join(trg_folder, f"{domain}.password")
|
|
1954
1953
|
|
|
1954
|
+
GeneralUtilities.assert_file_exists(src_file_pfx)
|
|
1955
|
+
GeneralUtilities.assert_file_exists(src_file_psw)
|
|
1956
|
+
GeneralUtilities.ensure_file_does_not_exist(trg_file_pfx)
|
|
1957
|
+
GeneralUtilities.ensure_file_does_not_exist(trg_file_psw)
|
|
1958
|
+
|
|
1959
|
+
GeneralUtilities.ensure_directory_exists(trg_folder)
|
|
1960
|
+
|
|
1955
1961
|
GeneralUtilities.ensure_directory_exists(trg_folder)
|
|
1956
1962
|
shutil.copyfile(src_file_pfx, trg_file_pfx)
|
|
1957
1963
|
shutil.copyfile(src_file_psw, trg_file_psw)
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
ScriptCollection/Executables.py,sha256=KAs82A9AsrpTY39Ohg1UrtZN-6e5_Ql17UbLlO0fZfA,30037
|
|
2
|
-
ScriptCollection/GeneralUtilities.py,sha256=
|
|
2
|
+
ScriptCollection/GeneralUtilities.py,sha256=VVbbGFD4qLwWV211-E-n3faP2fZGc8mOBlKLd0oKHl4,40765
|
|
3
3
|
ScriptCollection/ProcessesRunner.py,sha256=3mu4ZxzZleQo0Op6o9EYTCFiJfb6kx5ov2YfZfT89mU,1395
|
|
4
4
|
ScriptCollection/ProgramRunnerBase.py,sha256=2kMIAqdc65UjBAddOZkzy_aFx9h5roZ5a4bQNM6RV6Y,2480
|
|
5
5
|
ScriptCollection/ProgramRunnerEpew.py,sha256=4pjEd0r9Fcz3TTDv0MdTSd5KkigYXcWUVI1X43regfU,6477
|
|
6
6
|
ScriptCollection/ProgramRunnerPopen.py,sha256=BPY7-ZMIlqT7JOKz8qlB5c0laF2Js-ijzqk09GxZC48,3821
|
|
7
7
|
ScriptCollection/RPStream.py,sha256=NRRHL3YSP3D9MuAV2jB_--0KUKCsvJGxeKnxgrRZ9kY,1545
|
|
8
|
-
ScriptCollection/ScriptCollectionCore.py,sha256=
|
|
9
|
-
ScriptCollection/TasksForCommonProjectStructure.py,sha256=
|
|
8
|
+
ScriptCollection/ScriptCollectionCore.py,sha256=rJhF9af5vR3NeHMjZDpjCK2Jz1FGlMHz_ZRG_gwrY-U,121187
|
|
9
|
+
ScriptCollection/TasksForCommonProjectStructure.py,sha256=Zq6GSGegm3PkBX-jddHH5T7IDEFAFR71AEd_b6MT4y8,215915
|
|
10
10
|
ScriptCollection/UpdateCertificates.py,sha256=Eynbgu7k9jLxApP2D_8Il77B6BFjJap6K7oTeEAZYbk,7790
|
|
11
11
|
ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
ScriptCollection-3.5.
|
|
13
|
-
ScriptCollection-3.5.
|
|
14
|
-
ScriptCollection-3.5.
|
|
15
|
-
ScriptCollection-3.5.
|
|
16
|
-
ScriptCollection-3.5.
|
|
12
|
+
ScriptCollection-3.5.82.dist-info/METADATA,sha256=Mkg8JuYED_bQbgl1qQzYnWol_sEkm7NrlYSpCYsgojs,7664
|
|
13
|
+
ScriptCollection-3.5.82.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
14
|
+
ScriptCollection-3.5.82.dist-info/entry_points.txt,sha256=1jAL5AuB8mvdw2v-6E7wCZFThurQxchiQynL8DCi-Yg,3545
|
|
15
|
+
ScriptCollection-3.5.82.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
|
|
16
|
+
ScriptCollection-3.5.82.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|