44rem This script is intended for building official releases of Python.
55rem To use it to build alternative releases, you should clone this file
66rem and modify the following three URIs.
7- rem
8- rem The first two will ensure that your release can be installed
9- rem alongside an official Python release, while the second specifies
10- rem the URL that will be used to download installation files. The
11- rem files available from this URL *will* conflict with your installer.
12- rem Trust me, you don't want them, even if it seems like a good idea.
137
14- set RELEASE_URI_X86 = http://www.python.org/win32
15- set RELEASE_URI_X64 = http://www.python.org/amd64
16- set DOWNLOAD_URL_BASE = https://www.python.org/ftp/python
17- set DOWNLOAD_URL =
8+ rem These two will ensure that your release can be installed
9+ rem alongside an official Python release, by modifying the GUIDs used
10+ rem for all components.
11+ rem
12+ rem The following substitutions will be applied to the release URI:
13+ rem Variable Description Example
14+ rem {arch} architecture amd64, win32
15+ set RELEASE_URI = http://www.python.org/{arch}
16+
17+ rem This is the URL that will be used to download installation files.
18+ rem The files available from the default URL *will* conflict with your
19+ rem installer. Trust me, you don't want them, even if it seems like a
20+ rem good idea.
21+ rem
22+ rem The following substitutions will be applied to the download URL:
23+ rem Variable Description Example
24+ rem {version} version number 3.5.0
25+ rem {arch} architecture amd64, win32
26+ rem {releasename} release name a1, b2, rc3 (or blank for final)
27+ rem {msi} MSI filename core.msi
28+ set DOWNLOAD_URL = https://www.python.org/ftp/python/{version}/{arch}{releasename}/{msi}
1829
1930set D = %~dp0
2031set PCBUILD = %D% ..\..\PCBuild\
@@ -90,14 +101,12 @@ if "%1" EQU "x86" (
90101 set BUILD_PLAT = Win32
91102 set OUTDIR_PLAT = win32
92103 set OBJDIR_PLAT = x86
93- set RELEASE_URI = %RELEASE_URI_X86%
94104) ELSE (
95105 call " %PCBUILD% env.bat" x86_amd64
96106 set BUILD = %PCBUILD% amd64\
97107 set BUILD_PLAT = x64
98108 set OUTDIR_PLAT = amd64
99109 set OBJDIR_PLAT = x64
100- set RELEASE_URI = %RELEASE_URI_X64%
101110)
102111
103112if exist " %BUILD% en-us" (
@@ -157,10 +166,16 @@ echo -x64 Build x64 installers
157166echo --build (-b) Incrementally build Python rather than rebuilding
158167echo --skip-build (-B) Do not build Python (just do the installers)
159168echo --skip-doc (-D) Do not build documentation
160- echo --download Specify the full download URL for MSIs (should include {2})
169+ echo --download Specify the full download URL for MSIs
161170echo --test Specify the test directory to run the installer tests
162171echo -h Display this help information
163172echo .
164173echo If no architecture is specified, all architectures will be built.
165174echo If --test is not specified, the installer tests are not run.
166- echo .
175+ echo .
176+ echo The following substitutions will be applied to the download URL:
177+ echo Variable Description Example
178+ echo {version} version number 3.5.0
179+ echo {arch} architecture amd64, win32
180+ echo {releasename} release name a1, b2, rc3 (or blank for final)
181+ echo {msi} MSI filename core.msi
0 commit comments