Skip to content

buildrelease.bat lacks --disable-gil support for free-threaded Python 3.14+ releases #138666

@kuankuan2007

Description

@kuankuan2007

Bug report

Bug description:

The buildrelease.bat script does not support the --disable-gil parameter, which is required for building official free-threaded Python releases starting with Python 3.14. This prevents the creation of proper Windows installers for free-threaded Python builds.

Background

With PEP 779 introducing official support for free-threaded Python in Python 3.14 (moving from experimental status in 3.13), the ability to build official free-threaded releases is critical for Windows users.

Current State

  • PCbuild\build.bat supports --disable-gil
  • Tools\msi\build.bat supports --disable-gil
  • ❌ buildrelease.bat does not support --disable-gil

Problem Description

1. Missing --disable-gil Parameter Support

The buildrelease.bat script lacks the parameter parsing and handling for --disable-gil that exists in the other build scripts.

2. WiX Configuration Issues

Even when manually forcing the --disable-gil parameter to be passed to build.bat by modifying line 168-169 in buildrelease.bat:

@echo call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %PGOOPTS% %CERTOPTS% --disable-gil
@call "%PCBUILD%build.bat" -e -p %BUILD_PLAT% -t %TARGET% %PGOOPTS% %CERTOPTS% --disable-gil

The WiX packaging process fails because the configuration files cannot handle free-threaded binaries with the "t" suffix (e.g., python3t_d.dll).

Error Output

"J:\cpython\Tools\msi\bundle\releaselocal.wixproj"(Rebuild target) (1) ->
"J:\cpython\Tools\msi\core\core_d.wixproj"(Rebuild target) (3) ->
(Link target) ->
  J:\cpython\Tools\msi\core\core_files.wxs(23): error LGHT0103: The system cannot find the file 'python3_d.dll'. [J:\cpython\Tools\msi\core\core_d.wixproj]
  J:\cpython\Tools\msi\core\core_files.wxs(26): error LGHT0103: The system cannot find the file 'python314_d.dll'. [J:\cpython\Tools\msi\core\core_d.wixproj]
  J:\cpython\Tools\msi\core\core_files.wxs(27): error LGHT0103: The system cannot find the file 'python314_d.pdb'. [J:\cpython\Tools\msi\core\core_d.wixproj]

"J:\cpython\Tools\msi\bundle\releaselocal.wixproj"(Rebuild target) (1) ->
"J:\cpython\Tools\msi\dev\dev_d.wixproj"(Rebuild target) (6) ->
  J:\cpython\Tools\msi\dev\dev_files.wxs(25): error LGHT0103: The system cannot find the file 'python3_d.lib'. [J:\cpython\Tools\msi\dev\dev_d.wixproj]
  J:\cpython\Tools\msi\dev\dev_files.wxs(28): error LGHT0103: The system cannot find the file 'python314_d.lib'. [J:\cpython\Tools\msi\dev\dev_d.wixproj]

"J:\cpython\Tools\msi\bundle\releaselocal.wixproj"(Rebuild target) (1) ->
"J:\cpython\Tools\msi\exe\exe_d.wixproj"(Rebuild target) (9) ->
  J:\cpython\Tools\msi\exe\exe_files.wxs(57): error LGHT0103: The system cannot find the file 'python_d.exe'. [J:\cpython\Tools\msi\exe\exe_d.wixproj]

Expected Behavior

  1. buildrelease.bat should accept and properly handle the --disable-gil parameter
  2. The WiX configuration should be updated to support free-threaded binary names with the "t" suffix
  3. Official free-threaded Python Windows installers should be buildable using the standard release process

Steps to Reproduce

  1. Clone the CPython repository (3.14+ branch)
  2. Attempt to run: buildrelease.bat --disable-gil -x64
  3. Observe that the --disable-gil parameter is not recognized
  4. Manually modify the script to pass --disable-gil to build.bat
  5. Observe WiX packaging failures due to missing "t" suffix binaries

Environment

  • Target Python version: 3.14.0rc2
  • Venv Python version: 3.13.7
  • Operating System: Windows
  • Architecture: x64

Additional Context

This issue was originally discussed on discuss.python.org: I think we need to add –disable-gil support to buildrelease.bat for official free-threaded Python releases (3.14+)

Proposed Solution

  1. Add --disable-gil parameter support to buildrelease.bat similar to how it's implemented in build.bat
  2. Update the WiX configuration files to properly handle free-threaded binary naming conventions
  3. Ensure the MSI packaging process can correctly package free-threaded Python builds

This is critical for the Python 3.14 release cycle as free-threaded Python transitions from experimental to officially supported status.

CPython versions tested on:

3.14

Operating systems tested on:

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixes3.15new features, bugs and security fixesOS-windowsbuildThe build process and cross-buildtriagedThe issue has been accepted as valid by a triager.type-bugAn unexpected behavior, bug, or error

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions