Building on Windows¶
The windows build process.
- relenv.build.windows.build_python(env: MutableMapping[str, str], dirs: Dirs, logfp: IO[str]) None¶
Run the commands to build Python.
- relenv.build.windows.copy_pyconfig_h(source: Path, build_dir: Path, dest_dir: Path) Path¶
Copy
pyconfig.hinto the onedir’sIncludedirectory.Python <= 3.12 ships a checked-in
PC/pyconfig.h. Python 3.13+ replaced that withPC/pyconfig.h.inand MSBuild generates the real header into the build output directory. This mirrors the logic in CPython’sPC/layout/main.pyso the onedir’sInclude/always ends up with apyconfig.hnext toPython.h– without it C extensions cannot locate the configuration macros and fail withfatal error C1083: Cannot open include file: 'pyconfig.h'.
- relenv.build.windows.finalize(env: MutableMapping[str, str], dirs: Dirs, logfp: IO[str]) None¶
Finalize sitecustomize, relenv runtime, and pip for Windows.
- relenv.build.windows.find_vcvarsall(env: MutableMapping[str, str]) Path | None¶
Locate vcvarsall.bat using multiple strategies.
- relenv.build.windows.flatten_externals(dirs: Dirs, name: str, version: str) None¶
Handle nested folders in extracted tarballs.
- relenv.build.windows.get_externals_source(externals_dir: Path, url: str) None¶
Download external source code dependency.
- relenv.build.windows.populate_env(env: MutableMapping[str, str], dirs: Dirs) None¶
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_bzip2(dirs: Dirs, env: MutableMapping[str, str]) None¶
Update the BZIP2 library.
- relenv.build.windows.update_expat(dirs: Dirs, env: MutableMapping[str, str]) None¶
Update the EXPAT library.
- relenv.build.windows.update_libffi(dirs: Dirs, env: MutableMapping[str, str]) None¶
Update the LIBFFI library.
- relenv.build.windows.update_mpdecimal(dirs: Dirs, env: MutableMapping[str, str]) None¶
Update the MPDECIMAL library.
- relenv.build.windows.update_nasm(dirs: Dirs, env: MutableMapping[str, str]) None¶
Update the NASM library.
- relenv.build.windows.update_openssl(dirs: Dirs, env: MutableMapping[str, str]) None¶
Update the OPENSSL library.
- relenv.build.windows.update_perl(dirs: Dirs, env: MutableMapping[str, str]) Path¶
Update the Perl library.
- relenv.build.windows.update_props(source: Path, old: str, new: str) None¶
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: Dirs, env: MutableMapping[str, str]) None¶
Update the SQLITE library.