@@ -387,10 +387,7 @@ def create_installer_7zip(self, installer_type: str = ".exe"):
387387 ("DISTDIR" , str (self .winpy_dir )),
388388 ("ARCH" , str (self .architecture_bits )),
389389 ("VERSION" , f"{ self .python_full_version } .{ self .build_number } { self .flavor } " ),
390- (
391- "VERSION_INSTALL" ,
392- f'{ self .python_full_version .replace ("." , "" )} { self .build_number } ' ,
393- ),
390+ ("VERSION_INSTALL" , f'{ self .python_full_version .replace ("." , "" )} { self .build_number } ' ),
394391 ("RELEASELEVEL" , self .release_level ),
395392 ("INSTALLER_OPTION" , installer_type ), # Pass installer type as option to bat script
396393 ]
@@ -482,12 +479,12 @@ def _create_standard_batch_scripts(self):
482479 exe_name = self .distribution .short_exe if self .distribution else "python.exe"
483480
484481
485- def build (self , remove_existing : bool = True , requirements = None , winpy_dirname : str = None ):
482+ def build (self , rebuild : bool = True , requirements = None , winpy_dirname : str = None ):
486483 """Make WinPython distribution in target directory from the installers
487484 located in wheels_dir
488485
489- remove_existing =True: (default) install all from scratch
490- remove_existing =False: for complementary purposes (create installers)
486+ rebuild =True: (default) install all from scratch
487+ rebuild =False: for complementary purposes (create installers)
491488 requirements=file(s) of requirements (separated by space if several)"""
492489 python_zip_filename = self .python_zip_file .name
493490 print (f"Building WinPython with Python archive: { python_zip_filename } " )
@@ -497,13 +494,13 @@ def build(self, remove_existing: bool = True, requirements=None, winpy_dirname:
497494 else :
498495 self .winpy_dir = self .target_dir / winpy_dirname # Create/re-create the WinPython base directory
499496 self ._print_action (f"Creating WinPython { self .winpy_dir } base directory" )
500- if self .winpy_dir .is_dir () and remove_existing :
497+ if self .winpy_dir .is_dir () and rebuild :
501498 try :
502499 shutil .rmtree (self .winpy_dir , onexc = utils .onerror )
503500 except TypeError : # before 3.12
504501 shutil .rmtree (self .winpy_dir , onerror = utils .onerror )
505502 os .makedirs (self .winpy_dir , exist_ok = True )
506- if remove_existing :
503+ if rebuild :
507504 # preventive re-Creation of settings directory
508505 # (necessary if user is starting an application with a batch)
509506 (self .winpy_dir / "settings" / "AppData" / "Roaming" ).mkdir (parents = True , exist_ok = True ) # Ensure settings dir exists
@@ -515,7 +512,7 @@ def build(self, remove_existing: bool = True, requirements=None, winpy_dirname:
515512 indent = True ,
516513 )
517514
518- if remove_existing :
515+ if rebuild :
519516 self ._copy_default_scripts ()
520517 self ._create_initial_batch_scripts ()
521518 self ._create_standard_batch_scripts ()
@@ -538,7 +535,7 @@ def build(self, remove_existing: bool = True, requirements=None, winpy_dirname:
538535
539536 if requirements :
540537 if not list (requirements ) == requirements :
541- requirements = requirements .split ()
538+ requirements = requirements .split ("," )
542539 for req in requirements :
543540 actions = ["install" , "-r" , req ]
544541 if self .install_options is not None :
@@ -586,12 +583,12 @@ def rebuild_winpython_package(source_dir: Path, target_dir: Path, architecture:
586583
587584
588585def _parse_list_argument (arg_value : str | list [str ]) -> list [str ]:
589- """Parses a string or list argument into a list of strings."""
586+ """Parses a string or comma separated list argument into a list of strings."""
590587 if arg_value is None :
591588 return []
592589 if isinstance (arg_value , str ):
593- return arg_value .split ()
594- return list (arg_value ) # Ensure it's a list if already a list-like object
590+ return arg_value .split ("," )
591+ return list (arg_value )
595592
596593
597594def make_all (
@@ -601,7 +598,7 @@ def make_all(
601598 architecture : int ,
602599 basedir : Path ,
603600 verbose : bool = False ,
604- remove_existing : bool = True ,
601+ rebuild : bool = True ,
605602 create_installer : str = "True" ,
606603 install_options = ["--no-index" ],
607604 flavor : str = "" ,
@@ -682,7 +679,7 @@ def make_all(
682679 winpy_dirname = f"WPy{ architecture } -{ pyver .replace ('.' , '' )} { my_x } { build_number } { release_level } "
683680
684681 builder .build (
685- remove_existing = remove_existing ,
682+ rebuild = rebuild ,
686683 requirements = requirements_files_list ,
687684 winpy_dirname = winpy_dirname ,
688685 )
0 commit comments