Skip to content
Snippets Groups Projects
Select Git revision
  • 3ce43a2c85bad4947fec11ab51352fa3caaa294b
  • main default protected
  • 3.10
  • 3.11
  • revert-15688-bpo-38031-_io-FileIO-opener-crash
  • 3.8
  • 3.9
  • 3.7
  • enum-fix_auto
  • branch-v3.11.0
  • backport-c3648f4-3.11
  • gh-93963/remove-importlib-resources-abcs
  • refactor-wait_for
  • shared-testcase
  • v3.12.0a2
  • v3.12.0a1
  • v3.11.0
  • v3.8.15
  • v3.9.15
  • v3.10.8
  • v3.7.15
  • v3.11.0rc2
  • v3.8.14
  • v3.9.14
  • v3.7.14
  • v3.10.7
  • v3.11.0rc1
  • v3.10.6
  • v3.11.0b5
  • v3.11.0b4
  • v3.10.5
  • v3.11.0b3
  • v3.11.0b2
  • v3.9.13
34 results

buildrelease.bat

Blame
  • buildrelease.bat 9.76 KiB
    @setlocal
    @echo off
    
    rem This script is intended for building official releases of Python.
    rem To use it to build alternative releases, you should clone this file
    rem and modify the following three URIs.
    
    rem These two will ensure that your release can be installed
    rem alongside an official Python release, by modifying the GUIDs used
    rem for all components.
    rem
    rem The following substitutions will be applied to the release URI:
    rem     Variable        Description         Example
    rem     {arch}          architecture        amd64, win32
    rem Do not change the scheme to https. Otherwise, releases built with this
    rem script will not be upgradable to/from official releases of Python.
    set RELEASE_URI=http://www.python.org/{arch}
    
    rem This is the URL that will be used to download installation files.
    rem The files available from the default URL *will* conflict with your
    rem installer. Trust me, you don't want them, even if it seems like a
    rem good idea.
    rem
    rem The following substitutions will be applied to the download URL:
    rem     Variable        Description         Example
    rem     {version}       version number      3.5.0
    rem     {arch}          architecture        amd64, win32
    rem     {releasename}   release name        a1, b2, rc3 (or blank for final)
    rem     {msi}           MSI filename        core.msi
    set DOWNLOAD_URL=https://www.python.org/ftp/python/{version}/{arch}{releasename}/{msi}
    
    set D=%~dp0
    set PCBUILD=%D%..\..\PCbuild\
    if NOT DEFINED Py_OutDir set Py_OutDir=%PCBUILD%
    set EXTERNALS=%D%..\..\externals\windows-installer\
    
    set BUILDX86=
    set BUILDX64=
    set BUILDARM64=
    set TARGET=Rebuild
    set TESTTARGETDIR=
    set PGO=-m test -q --pgo
    set BUILDMSI=1
    set BUILDNUGET=1
    set BUILDZIP=1
    
    
    :CheckOpts
    if    "%1" EQU "-h" goto Help
    if    "%1" EQU "-c" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
    if    "%1" EQU "--certificate" (set CERTNAME=%~2) && shift && shift && goto CheckOpts
    if    "%1" EQU "-o" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
    if    "%1" EQU "--out" (set OUTDIR=%~2) && shift && shift && goto CheckOpts
    if    "%1" EQU "-D" (set SKIPDOC=1) && shift && goto CheckOpts
    if    "%1" EQU "--skip-doc" (set SKIPDOC=1) && shift && goto CheckOpts
    if    "%1" EQU "-B" (set SKIPBUILD=1) && shift && goto CheckOpts
    if    "%1" EQU "--skip-build" (set SKIPBUILD=1) && shift && goto CheckOpts
    if    "%1" EQU "--download" (set DOWNLOAD_URL=%~2) && shift && shift && goto CheckOpts
    if    "%1" EQU "--test" (set TESTTARGETDIR=%~2) && shift && shift && goto CheckOpts
    if    "%1" EQU "-b" (set TARGET=Build) && shift && goto CheckOpts
    if    "%1" EQU "--build" (set TARGET=Build) && shift && goto CheckOpts
    if /I "%1" EQU "-x86" (set BUILDX86=1) && shift && goto CheckOpts
    if /I "%1" EQU "-Win32" (set BUILDX86=1) && shift && goto CheckOpts
    if /I "%1" EQU "-x64" (set BUILDX64=1) && shift && goto CheckOpts
    if /I "%1" EQU "-arm64" (set BUILDARM64=1) && shift && goto CheckOpts
    if    "%1" EQU "--pgo" (set PGO=%~2) && shift && shift && goto CheckOpts
    if    "%1" EQU "--skip-pgo" (set PGO=) && shift && goto CheckOpts
    if    "%1" EQU "--skip-nuget" (set BUILDNUGET=) && shift && goto CheckOpts
    if    "%1" EQU "--skip-zip" (set BUILDZIP=) && shift && goto CheckOpts
    if    "%1" EQU "--skip-msi" (set BUILDMSI=) && shift && goto CheckOpts