@@ -194,6 +194,7 @@ def __init__(
194194 ssh_user : str ,
195195 sign_gpg : bool ,
196196 ssh_key : str | None = None ,
197+ security_release : bool = False ,
197198 first_state : Task | None = None ,
198199 ) -> None :
199200 self .tasks = tasks
@@ -220,6 +221,8 @@ def __init__(
220221 self .db ["ssh_key" ] = ssh_key
221222 if not self .db .get ("sign_gpg" ):
222223 self .db ["sign_gpg" ] = sign_gpg
224+ if not self .db .get ("security_release" ):
225+ self .db ["security_release" ] = security_release
223226
224227 if not self .db .get ("release" ):
225228 self .db ["release" ] = release_tag
@@ -233,6 +236,7 @@ def __init__(
233236 print (f"- SSH key: { self .db ['ssh_key' ] or 'Default' } " )
234237 print (f"- python.org API key: { self .db ['auth_info' ]} " )
235238 print (f"- Sign with GPG: { self .db ['sign_gpg' ]} " )
239+ print (f"- Security release: { self .db ['security_release' ]} " )
236240 print ()
237241
238242 def checkpoint (self ) -> None :
@@ -930,18 +934,32 @@ def wait_until_all_files_are_in_folder(db: ReleaseShelf) -> None:
930934 are_windows_files_there = f"python-{ release } .exe" in all_files
931935 are_macos_files_there = f"python-{ release } -macos11.pkg" in all_files
932936 are_linux_files_there = f"Python-{ release } .tgz" in all_files
933- are_all_files_there = (
934- are_linux_files_there and are_windows_files_there and are_macos_files_there
935- )
937+
938+ if db ["security_release" ]:
939+ # For security releases, only check Linux files
940+ are_all_files_there = are_linux_files_there
941+ else :
942+ # For regular releases, check all platforms
943+ are_all_files_there = (
944+ are_linux_files_there and are_windows_files_there and are_macos_files_there
945+ )
946+
936947 if not are_all_files_there :
937948 linux_tick = "✅" if are_linux_files_there else "❌"
938949 windows_tick = "✅" if are_windows_files_there else "❌"
939950 macos_tick = "✅" if are_macos_files_there else "❌"
940- print (
941- f"\r Waiting for files: Linux { linux_tick } Windows { windows_tick } Mac { macos_tick } " ,
942- flush = True ,
943- end = "" ,
944- )
951+ if db ["security_release" ]:
952+ print (
953+ f"\r Waiting for files: Linux { linux_tick } (security release mode - only checking Linux) " ,
954+ flush = True ,
955+ end = "" ,
956+ )
957+ else :
958+ print (
959+ f"\r Waiting for files: Linux { linux_tick } Windows { windows_tick } Mac { macos_tick } " ,
960+ flush = True ,
961+ end = "" ,
962+ )
945963 time .sleep (1 )
946964 print ()
947965
@@ -1273,6 +1291,13 @@ def _api_key(api_key: str) -> str:
12731291 help = "Path to the SSH key file to use for authentication" ,
12741292 type = str ,
12751293 )
1294+ parser .add_argument (
1295+ "--security-release" ,
1296+ dest = "security_release" ,
1297+ action = "store_true" ,
1298+ default = False ,
1299+ help = "Indicate this is a security release (only checks for Linux files)" ,
1300+ )
12761301 args = parser .parse_args ()
12771302
12781303 auth_key = args .auth_key or os .getenv ("AUTH_INFO" )
@@ -1368,6 +1393,7 @@ def _api_key(api_key: str) -> str:
13681393 ssh_user = args .ssh_user ,
13691394 sign_gpg = not no_gpg ,
13701395 ssh_key = args .ssh_key ,
1396+ security_release = args .security_release ,
13711397 tasks = tasks ,
13721398 )
13731399 automata .run ()
0 commit comments