How to generate embeddable ZIP and Nuget package for ARM64?

Hello community,

With 3.12.10 being the “final regular bugfix release with binary installers” (see: PEP 693), I am venturing into creating Windows installers for my team.

While I am able to create the installers for all architectures (ARM64, x64, and x86), buildrelease.bat only generates Nuget packages and embeddable ZIP for x64 and x86 and skips it for ARM64.

Is there a special flag I should use for generating those on ARM64?

> .\Tools\msi\buildrelease.bat -ARM64

Thanks!

For the security-only releases of Python 3.11.10-3.11.12, I was able to generate the embeddable ZIP and Nuget packages for ARM64 by applying the following patch: PythonWindows/patches/enable-arm64-zip-nupkg.patch at master · adang1345/PythonWindows · GitHub. This allowed buildrelease.bat to generate packages for x86, x64, and ARM64 when run on a Windows x64 machine.

1 Like

That should do it. Thanks, @adang1345!

Since I am using the windows-11-arm runner on GitHub, based on the patch you’ve shared I have only patched buildrelease.bat using the following:

buildrelease.patch:

--- a/Tools/msi/buildrelease.bat
+++ b/Tools/msi/buildrelease.bat
@@ -194,21 +194,13 @@
 )

 if defined BUILDZIP (
-    if "%BUILD_PLAT%" EQU "ARM64" (
-        echo Skipping embeddable ZIP generation for ARM64 platform
-    ) else (
-        %MSBUILD% "%D%make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS% /p:OutputPath="%BUILD%en-us"
-        if errorlevel 1 exit /B %ERRORLEVEL%
-    )
+    %MSBUILD% "%D%make_zip.proj" /t:Build %BUILDOPTS% %CERTOPTS% /p:OutputPath="%BUILD%en-us"
+    if errorlevel 1 exit /B %ERRORLEVEL%
 )

 if defined BUILDNUGET (
-    if "%BUILD_PLAT%" EQU "ARM64" (
-        echo Skipping Nuget package generation for ARM64 platform
-    ) else (
-        %MSBUILD% "%D%..\nuget\make_pkg.proj" /t:Build /p:Configuration=Release /p:Platform=%1 /p:OutputPath="%BUILD%en-us"
-        if errorlevel 1 exit /B %ERRORLEVEL%
-    )
+    %MSBUILD% "%D%..\nuget\make_pkg.proj" /t:Build /p:Configuration=Release /p:Platform=%1 /p:OutputPath="%BUILD%en-us"
+    if errorlevel 1 exit /B %ERRORLEVEL%
 )

 if not "%OUTDIR%" EQU "" (

And that produces both ZIP and Nuget package.

> Get-ChildItem .\PCbuild\arm64\en-us

    Directory: C:\a\python3.12-arm\python3.12-arm\Python-3.12.10\PCbuild\arm64\en-us

Mode                 LastWriteTime         Length Name                                                                 
----                 -------------         ------ ----                                                                 
-a----         5/15/2025  10:05 PM          36864 appendpath.msi                                                       
-a----         5/15/2025  10:05 PM          76099 appendpath.wixpdb                                                    
-a----         5/15/2025  10:01 PM        1941504 core.msi                                                             
-a----         5/15/2025  10:01 PM          58992 core.wixpdb                                                          
-a----         5/15/2025  10:01 PM        5107712 core_d.msi                                                           
-a----         5/15/2025  10:01 PM          66728 core_d.wixpdb                                                        
-a----         5/15/2025  10:02 PM        3706880 core_pdb.msi                                                         
-a----         5/15/2025  10:02 PM          63672 core_pdb.wixpdb                                                      
-a----         5/15/2025  10:02 PM         380928 dev.msi                                                              
-a----         5/15/2025  10:02 PM         630585 dev.wixpdb                                                           
-a----         5/15/2025  10:02 PM         118784 dev_d.msi                                                            
-a----         5/15/2025  10:02 PM          62096 dev_d.wixpdb                                                         
-a----         5/15/2025  10:03 PM        5910656 doc.msi                                                              
-a----         5/15/2025  10:03 PM        1815461 doc.wixpdb                                                           
-a----         5/15/2025  10:03 PM         737280 exe.msi                                                              
-a----         5/15/2025  10:03 PM         103997 exe.wixpdb                                                           
-a----         5/15/2025  10:03 PM         212992 exe_d.msi                                                            
-a----         5/15/2025  10:03 PM          65653 exe_d.wixpdb                                                         
-a----         5/15/2025  10:03 PM         118784 exe_pdb.msi                                                          
-a----         5/15/2025  10:03 PM          61605 exe_pdb.wixpdb                                                       
-a----         5/15/2025  10:04 PM        6856073 lib.msi                                                              
-a----         5/15/2025  10:04 PM        1798812 lib.wixpdb                                                           
-a----         5/15/2025  10:04 PM        4845568 lib_d.msi                                                            
-a----         5/15/2025  10:04 PM         156368 lib_d.wixpdb                                                         
-a----         5/15/2025  10:04 PM        7798784 lib_pdb.msi                                                          
-a----         5/15/2025  10:05 PM         116470 lib_pdb.wixpdb                                                       
-a----         5/15/2025  10:05 PM          36864 path.msi                                                             
-a----         5/15/2025  10:05 PM          75432 path.wixpdb                                                          
-a----         5/15/2025  10:05 PM         278528 pip.msi                                                              
-a----         5/15/2025  10:05 PM         192258 pip.wixpdb                                                           
-a----         5/15/2025  10:08 PM       25786931 python-3.12.10-arm64.exe                                             
-a----         5/15/2025  10:08 PM         314391 python-3.12.10-arm64.wixpdb                                          
-a----         5/15/2025  10:08 PM        9960875 python-3.12.10-embed-arm64.zip                                       
-a----         5/15/2025  10:08 PM       13254636 python.3.12.10.nupkg                                                 
-a----         5/15/2025  10:05 PM        3350508 tcltk.msi                                                            
-a----         5/15/2025  10:05 PM        4216935 tcltk.wixpdb                                                         
-a----         5/15/2025  10:06 PM         208896 tcltk_d.msi                                                          
-a----         5/15/2025  10:06 PM          64444 tcltk_d.wixpdb                                                       
-a----         5/15/2025  10:06 PM         163840 tcltk_pdb.msi                                                        
-a----         5/15/2025  10:06 PM          60153 tcltk_pdb.wixpdb                                                     
-a----         5/15/2025  10:07 PM        5622984 test.msi                                                             
-a----         5/15/2025  10:07 PM        4752420 test.wixpdb                                                          
-a----         5/15/2025  10:07 PM         901120 test_d.msi                                                           
-a----         5/15/2025  10:07 PM          97520 test_d.wixpdb                                                        
-a----         5/15/2025  10:07 PM         671744 test_pdb.msi                                                         
-a----         5/15/2025  10:07 PM          78493 test_pdb.wixpdb

Apparently, everything seems to be normal.

Thanks again!