@@ -387,10 +387,7 @@ def create_installer_7zip(self, installer_type: str = ".exe"):
387
387
("DISTDIR" , str (self .winpy_dir )),
388
388
("ARCH" , str (self .architecture_bits )),
389
389
("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 } ' ),
394
391
("RELEASELEVEL" , self .release_level ),
395
392
("INSTALLER_OPTION" , installer_type ), # Pass installer type as option to bat script
396
393
]
@@ -482,12 +479,12 @@ def _create_standard_batch_scripts(self):
482
479
exe_name = self .distribution .short_exe if self .distribution else "python.exe"
483
480
484
481
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 ):
486
483
"""Make WinPython distribution in target directory from the installers
487
484
located in wheels_dir
488
485
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)
491
488
requirements=file(s) of requirements (separated by space if several)"""
492
489
python_zip_filename = self .python_zip_file .name
493
490
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:
497
494
else :
498
495
self .winpy_dir = self .target_dir / winpy_dirname # Create/re-create the WinPython base directory
499
496
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 :
501
498
try :
502
499
shutil .rmtree (self .winpy_dir , onexc = utils .onerror )
503
500
except TypeError : # before 3.12
504
501
shutil .rmtree (self .winpy_dir , onerror = utils .onerror )
505
502
os .makedirs (self .winpy_dir , exist_ok = True )
506
- if remove_existing :
503
+ if rebuild :
507
504
# preventive re-Creation of settings directory
508
505
# (necessary if user is starting an application with a batch)
509
506
(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:
515
512
indent = True ,
516
513
)
517
514
518
- if remove_existing :
515
+ if rebuild :
519
516
self ._copy_default_scripts ()
520
517
self ._create_initial_batch_scripts ()
521
518
self ._create_standard_batch_scripts ()
@@ -538,7 +535,7 @@ def build(self, remove_existing: bool = True, requirements=None, winpy_dirname:
538
535
539
536
if requirements :
540
537
if not list (requirements ) == requirements :
541
- requirements = requirements .split ()
538
+ requirements = requirements .split ("," )
542
539
for req in requirements :
543
540
actions = ["install" , "-r" , req ]
544
541
if self .install_options is not None :
@@ -586,12 +583,12 @@ def rebuild_winpython_package(source_dir: Path, target_dir: Path, architecture:
586
583
587
584
588
585
def _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."""
590
587
if arg_value is None :
591
588
return []
592
589
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 )
595
592
596
593
597
594
def make_all (
@@ -601,7 +598,7 @@ def make_all(
601
598
architecture : int ,
602
599
basedir : Path ,
603
600
verbose : bool = False ,
604
- remove_existing : bool = True ,
601
+ rebuild : bool = True ,
605
602
create_installer : str = "True" ,
606
603
install_options = ["--no-index" ],
607
604
flavor : str = "" ,
@@ -682,7 +679,7 @@ def make_all(
682
679
winpy_dirname = f"WPy{ architecture } -{ pyver .replace ('.' , '' )} { my_x } { build_number } { release_level } "
683
680
684
681
builder .build (
685
- remove_existing = remove_existing ,
682
+ rebuild = rebuild ,
686
683
requirements = requirements_files_list ,
687
684
winpy_dirname = winpy_dirname ,
688
685
)
0 commit comments