Building on Windows

The windows build process.

relenv.build.windows.build_python(env, dirs, logfp)

Run the commands to build Python.

Parameters:
  • env (dict) – The environment dictionary

  • dirs (relenv.build.common.Dirs) – The working directories

  • logfp (file) – A handle for the log file

relenv.build.windows.finalize(env, dirs, logfp)

Finalize sitecustomize, relenv runtime, and pip for Windows.

Parameters:
  • env (dict) – The environment dictionary

  • dirs (relenv.build.common.Dirs) – The working directories

  • logfp (file) – A handle for the log file

relenv.build.windows.get_externals_bin(source_root, url)

Download external binary dependency.

Download binaries to the “externals” directory in the root of the python source.

relenv.build.windows.get_externals_source(externals_dir, url)

Download external source code dependency.

Download source code and extract to the “externals” directory in the root of the python source. Only works with a tarball

relenv.build.windows.populate_env(env, dirs)

Make sure we have the correct environment variables set.

Parameters:
  • env (dict) – The environment dictionary

  • dirs (relenv.build.common.Dirs) – The working directories

relenv.build.windows.update_expat(dirs, env)

Update the EXPAT library.

relenv.build.windows.update_expat_check(env)

Check if the given python version should get an updated libexpat.

Patch libexpat on these versions and below:
  • 3.9.23

  • 3.10.18

  • 3.11.13

  • 3.12.11

  • 3.13.7

relenv.build.windows.update_props(source, old, new)

Overwrite a dependency string for Windows PCBuild.

Parameters:
  • source (str) – Python’s source directory

  • old (str) – Regular expression to search for

  • new (str) – Replacement text

relenv.build.windows.update_sqlite(dirs, env)

Update the SQLITE library.

relenv.build.windows.update_xz(dirs, env)

Update the XZ library.