From aa25d5d026b21a6bac66ff1c47e96cbf6227473a Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Fri, 12 Apr 2019 09:36:38 -0700 Subject: [PATCH] Enable building nuget packages for ARM32 (GH-12669) --- Tools/nuget/build.bat | 19 ++++++++++++++++--- Tools/nuget/make_pkg.proj | 1 + Tools/nuget/pythonarm32.nuspec | 19 +++++++++++++++++++ 3 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 Tools/nuget/pythonarm32.nuspec diff --git a/Tools/nuget/build.bat b/Tools/nuget/build.bat index f75cb3f7ba4..b532bd74216 100644 --- a/Tools/nuget/build.bat +++ b/Tools/nuget/build.bat @@ -6,20 +6,24 @@ if "%Py_OutDir%"=="" set Py_OutDir=%PCBUILD% set BUILDX86= set BUILDX64= +set BUILDARM32= set REBUILD= set OUTPUT= set PACKAGES= +set PYTHON_EXE= :CheckOpts if "%~1" EQU "-h" goto Help if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts +if "%~1" EQU "-arm32" (set BUILDARM32=1) && shift && goto CheckOpts if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts if "%~1" EQU "-o" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts if "%~1" EQU "--out" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts if "%~1" EQU "-p" (set PACKAGES=%PACKAGES% %~2) && shift && shift && goto CheckOpts +if "%~1" EQU "--python-exe" (set PYTHON_EXE="/p:PythonExe=%~2") && shift && shift && goto CheckOpts -if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1) +if not defined BUILDX86 if not defined BUILDX64 if not defined BUILDARM32 (set BUILDX86=1) && (set BUILDX64=1) && (set BUILDARM32=1) call "%D%..\msi\get_externals.bat" call "%PCBUILD%find_msbuild.bat" %MSBUILD% @@ -32,7 +36,7 @@ if defined BUILDX86 ( ) else if not exist "%Py_OutDir%win32\python.exe" call "%PCBUILD%build.bat" -e if errorlevel 1 goto :eof - %MSBUILD% "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x86 %OUTPUT% %PACKAGES% + %MSBUILD% "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x86 %OUTPUT% %PACKAGES% %PYTHON_EXE% if errorlevel 1 goto :eof ) @@ -41,7 +45,16 @@ if defined BUILDX64 ( ) else if not exist "%Py_OutDir%amd64\python.exe" call "%PCBUILD%build.bat" -p x64 -e if errorlevel 1 goto :eof - %MSBUILD% "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x64 %OUTPUT% %PACKAGES% + %MSBUILD% "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x64 %OUTPUT% %PACKAGES% %PYTHON_EXE% + if errorlevel 1 goto :eof +) + +if defined BUILDARM32 ( + if defined REBUILD ( call "%PCBUILD%build.bat" -p ARM -e -r --no-tkinter + ) else if not exist "%Py_OutDir%arm32\python.exe" call "%PCBUILD%build.bat" -p ARM -e --no-tkinter + if errorlevel 1 goto :eof + + %MSBUILD% "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=ARM %OUTPUT% %PACKAGES% %PYTHON_EXE% if errorlevel 1 goto :eof ) diff --git a/Tools/nuget/make_pkg.proj b/Tools/nuget/make_pkg.proj index 5638952ac9f..b387b8eef54 100644 --- a/Tools/nuget/make_pkg.proj +++ b/Tools/nuget/make_pkg.proj @@ -4,6 +4,7 @@ {10487945-15D1-4092-A214-338395C4116B} python $(OutputName)x86 + $(OutputName)arm32 $(OutputName)daily false diff --git a/Tools/nuget/pythonarm32.nuspec b/Tools/nuget/pythonarm32.nuspec new file mode 100644 index 00000000000..273d79a0312 --- /dev/null +++ b/Tools/nuget/pythonarm32.nuspec @@ -0,0 +1,19 @@ + + + + pythonarm32 + Python (ARM32) + Python Software Foundation + 0.0.0.0 + https://docs.python.org/3/license.html + https://www.python.org/ + false + Installs Python ARM32 for use in build scenarios. + https://www.python.org/static/favicon.ico + python + + + + + +