Skip to content
Prev Previous commit
Next Next commit
Apply text wrapping and environment variable suggestion
  • Loading branch information
pranavchoudhary-tech committed Jul 9, 2026
commit 1f573ad8d61c383a5483e88c6c665e424c334bff
19 changes: 14 additions & 5 deletions PCbuild/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,21 @@ this behavior, try `build.bat -h` to learn more.
Custom Output Directory
-----------------------

If you want to move the build outputs to a different directory, do not use the standard MSBuild `/p:OutDir=` property, as CPython has many assumptions about where the source repository is relative to the built files.
Instead, you can override the output directory by setting `Py_OutDir` (for example, `build.bat "/p:Py_OutDir=C:\MyOutput"`).

However, be aware that the compiled binaries probably won't run directly from that location. If you want to make an install-shaped layout without creating the installer, build CPython normally first, and then use the `PC/layout` script with the runtime you just built:
If you want to move the build outputs to a different directory, do not use the
standard MSBuild `/p:OutDir=` property, as CPython has many assumptions about
where the source repository is relative to the built files. Instead, you can
override the output directory by setting `Py_OutDir` as an environment
variable or by passing it to build.bat (for example,
`build.bat "/p:Py_OutDir=C:\MyOutput"`).

However, be aware that the compiled binaries probably won't run directly from
that location. If you want to make an install-shaped layout without creating the
installer, build CPython normally first, and then use the `PC/layout` script
with the runtime you just built, or using the `--build` and `--source` options
to specify the directories:
python.bat PC/layout --<options>
Use `-h` with that command to see all available options for customizing the layout.
Use `-h` with that command to see all available options for customizing the
layout.


C Runtime
Expand Down
Loading