Skip to content

Commit dfd26ac

Browse files
docs: clarify custom build output directory in PCbuild/readme.txt
1 parent 548c731 commit dfd26ac

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

PCbuild/readme.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,17 @@ the 32-bit Win32 platform. It accepts several arguments to change
105105
this behavior, try `build.bat -h` to learn more.
106106

107107

108+
Custom Output Directory
109+
-----------------------
110+
111+
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.
112+
Instead, you can override the output directory by setting `Py_OutDir` (for example, `build.bat "/p:Py_OutDir=C:\MyOutput"`).
113+
114+
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:
115+
python.bat PC/layout --<options>
116+
Use `-h` with that command to see all available options for customizing the layout.
117+
118+
108119
C Runtime
109120
---------
110121

0 commit comments

Comments
 (0)