Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit aa25d5d

Browse files
paulmonzooba
authored andcommittedApr 12, 2019
Enable building nuget packages for ARM32 (pythonGH-12669)
1 parent b75b1a3 commit aa25d5d

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed
 

‎Tools/nuget/build.bat

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,24 @@ if "%Py_OutDir%"=="" set Py_OutDir=%PCBUILD%
66

77
set BUILDX86=
88
set BUILDX64=
9+
set BUILDARM32=
910
set REBUILD=
1011
set OUTPUT=
1112
set PACKAGES=
13+
set PYTHON_EXE=
1214

1315
:CheckOpts
1416
if "%~1" EQU "-h" goto Help
1517
if "%~1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
1618
if "%~1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
19+
if "%~1" EQU "-arm32" (set BUILDARM32=1) && shift && goto CheckOpts
1720
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
1821
if "%~1" EQU "-o" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts
1922
if "%~1" EQU "--out" (set OUTPUT="/p:OutputPath=%~2") && shift && shift && goto CheckOpts
2023
if "%~1" EQU "-p" (set PACKAGES=%PACKAGES% %~2) && shift && shift && goto CheckOpts
24+
if "%~1" EQU "--python-exe" (set PYTHON_EXE="/p:PythonExe=%~2") && shift && shift && goto CheckOpts
2125

22-
if not defined BUILDX86 if not defined BUILDX64 (set BUILDX86=1) && (set BUILDX64=1)
26+
if not defined BUILDX86 if not defined BUILDX64 if not defined BUILDARM32 (set BUILDX86=1) && (set BUILDX64=1) && (set BUILDARM32=1)
2327

2428
call "%D%..\msi\get_externals.bat"
2529
call "%PCBUILD%find_msbuild.bat" %MSBUILD%
@@ -32,7 +36,7 @@ if defined BUILDX86 (
3236
) else if not exist "%Py_OutDir%win32\python.exe" call "%PCBUILD%build.bat" -e
3337
if errorlevel 1 goto :eof
3438

35-
%MSBUILD% "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x86 %OUTPUT% %PACKAGES%
39+
%MSBUILD% "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x86 %OUTPUT% %PACKAGES% %PYTHON_EXE%
3640
if errorlevel 1 goto :eof
3741
)
3842

@@ -41,7 +45,16 @@ if defined BUILDX64 (
4145
) else if not exist "%Py_OutDir%amd64\python.exe" call "%PCBUILD%build.bat" -p x64 -e
4246
if errorlevel 1 goto :eof
4347

44-
%MSBUILD% "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x64 %OUTPUT% %PACKAGES%
48+
%MSBUILD% "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=x64 %OUTPUT% %PACKAGES% %PYTHON_EXE%
49+
if errorlevel 1 goto :eof
50+
)
51+
52+
if defined BUILDARM32 (
53+
if defined REBUILD ( call "%PCBUILD%build.bat" -p ARM -e -r --no-tkinter
54+
) else if not exist "%Py_OutDir%arm32\python.exe" call "%PCBUILD%build.bat" -p ARM -e --no-tkinter
55+
if errorlevel 1 goto :eof
56+
57+
%MSBUILD% "%D%make_pkg.proj" /p:Configuration=Release /p:Platform=ARM %OUTPUT% %PACKAGES% %PYTHON_EXE%
4558
if errorlevel 1 goto :eof
4659
)
4760

‎Tools/nuget/make_pkg.proj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<ProjectGuid>{10487945-15D1-4092-A214-338395C4116B}</ProjectGuid>
55
<OutputName>python</OutputName>
66
<OutputName Condition="$(Platform) == 'x86'">$(OutputName)x86</OutputName>
7+
<OutputName Condition="$(Platform) == 'ARM'">$(OutputName)arm32</OutputName>
78
<OutputName Condition="$(BuildForDaily) == 'true'">$(OutputName)daily</OutputName>
89
<OutputSuffix></OutputSuffix>
910
<SupportSigning>false</SupportSigning>

‎Tools/nuget/pythonarm32.nuspec

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0"?>
2+
<package >
3+
<metadata>
4+
<id>pythonarm32</id>
5+
<title>Python (ARM32)</title>
6+
<authors>Python Software Foundation</authors>
7+
<version>0.0.0.0</version>
8+
<licenseUrl>https://docs.python.org/3/license.html</licenseUrl>
9+
<projectUrl>https://www.python.org/</projectUrl>
10+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
11+
<description>Installs Python ARM32 for use in build scenarios.</description>
12+
<iconUrl>https://www.python.org/static/favicon.ico</iconUrl>
13+
<tags>python</tags>
14+
</metadata>
15+
<files>
16+
<file src="**\*" exclude="python.props" target="tools" />
17+
<file src="python.props" target="build\native" />
18+
</files>
19+
</package>

0 commit comments

Comments
 (0)
Please sign in to comment.