|
31 | 31 | def find_7zip_executable() -> str: |
32 | 32 | """ |
33 | 33 | Locates the 7-Zip executable (7z.exe) in common installation directories. |
34 | | -
|
35 | | - Raises: |
36 | | - RuntimeError: If 7-Zip executable is not found. |
37 | | -
|
38 | | - Returns: |
39 | | - str: Path to the 7-Zip executable. |
40 | 34 | """ |
41 | 35 | program_files_dirs = [ |
42 | 36 | Path(r"C:\Program Files"), |
@@ -116,11 +110,6 @@ def build_installer_7zip( |
116 | 110 | def _copy_items(source_dirs: list[Path], target_dir: Path, verbose: bool = False): |
117 | 111 | """ |
118 | 112 | Copies items from source directories to the target directory. |
119 | | -
|
120 | | - Args: |
121 | | - source_dirs: List of source directories to copy items from. |
122 | | - target_dir: Target directory to copy items to. |
123 | | - verbose: Enable verbose output. |
124 | 113 | """ |
125 | 114 | target_dir.mkdir(parents=True, exist_ok=True) |
126 | 115 | for source_dir in source_dirs: |
@@ -538,19 +527,6 @@ def _create_standard_batch_scripts(self): |
538 | 527 | if self.distribution and (Path(self.distribution.target) / r"lib-python\3\idlelib").is_dir(): |
539 | 528 | batch_replacements.append((r"\Lib\idlelib", r"\lib-python\3\idlelib")) |
540 | 529 |
|
541 | | - for ini_patch_script in [ |
542 | | - ("make_working_directory_be_not_winpython.bat", "[active_environment", "[inactive_environment", "[inactive_environment_per_user]", "[active_environment_per_user]"), |
543 | | - ("make_working_directory_be_winpython.bat", "[active_environment", "[inactive_environment"), |
544 | | - ("make_working_directory_and_userprofile_be_winpython.bat", "[active_environment", "[inactive_environment", "[inactive_environment_common]", "[active_environment_common]") |
545 | | - ]: |
546 | | - name, patch1_start, patch1_end, *patch2 = ini_patch_script |
547 | | - content = f"""call "%~dp0env_for_icons.bat" |
548 | | -"%PYTHON%" -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%~dp0..\\settings\winpython.ini', '{patch1_start}', '{patch1_end}' )" |
549 | | -""" |
550 | | - if patch2: |
551 | | - content += f""""%PYTHON%" -c "from winpython.utils import patch_sourcefile;patch_sourcefile(r'%~dp0..\\settings\winpython.ini', '{patch2[0]}', '{patch2[1]}' )" """ |
552 | | - self.create_batch_script(name, content) |
553 | | - |
554 | 530 | self._print_action_done() |
555 | 531 |
|
556 | 532 |
|
|
0 commit comments