8000 Merge pull request #1514 from stonebig/master · winpython/winpython@fd20355 · GitHub
[go: up one dir, main page]

Skip to content

Commit fd20355

Browse files
authored
Merge pull request #1514 from stonebig/master
fix-up and remove dead create_batch_script()
2 parents 75b19a4 + f01d177 commit fd20355

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

make.py

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -332,29 +332,6 @@ def documentation_directories_list(self) -> list[Path]:
332332
return [default_docs_directory] + self.documentation_directories
333333
return self.documentation_directories
334334

335-
def create_batch_script(self, name: str, contents: str, replacements: list[tuple[str, str]] = None):
336-
"""
337-
Creates a batch script in the WinPython scripts directory.
338-
339-
Args:
340-
name: The name of the batch script file.
341-
contents: The contents of the batch script.
342-
replacements: A list of tuples for text replacements in the content.
343-
"""
344-
script_directory = self.winpython_directory / "scripts" if self.winpython_directory else None
345-
if not script_directory:
346-
print("Warning: WinPython directory not set, cannot create batch script.")
347-
return
348-
script_directory.mkdir(parents=True, exist_ok=True)
349-
final_contents = contents
350-
if replacements:
351-
for old_text, new_text in replacements:
352-
final_contents = final_contents.replace(old_text, new_text)
353-
script_path = script_directory / name
354-
with open(script_path, "w") as f:
355-
f.write(final_contents)
356-
print(f"Created batch script: {script_path}")
357-
358335
def create_installer_7zip(self, installer_type: str = ".exe"):
359336
"""
360337
Creates a WinPython installer using 7-Zip.
@@ -510,7 +487,7 @@ def build(self, rebuild: bool = True, requirements_files_list=None, winpy_dirnam
510487
# Writing changelog
511488
self._print_action("Writing changelog")
512489
shutil.copyfile(output_markdown_filename, str(Path(CHANGELOGS_DIRECTORY) / Path(output_markdown_filename).name))
513-
diff.write_changelog(self.winpyver2, None, self.base_directory, self.flavor, self.release_level, self.distribution.architecture)
490+
diff.write_changelog(self.winpyver2, None, self.base_directory, self.flavor, self.distribution.architecture)
514491

515492

516493
def rebuild_winpython_package(source_directory: Path, target_directory: Path, architecture: int = 64, verbose: bool = False):

0 commit comments

Comments
 (0)
0