Skip to content

Ignore the free-threaded Windows build output directories#154641

Open
gianghungtien wants to merge 1 commit into
python:mainfrom
gianghungtien:gitignore-freethreaded-build-dirs
Open

Ignore the free-threaded Windows build output directories#154641
gianghungtien wants to merge 1 commit into
python:mainfrom
gianghungtien:gitignore-freethreaded-build-dirs

Conversation

@gianghungtien

Copy link
Copy Markdown
Contributor

Split out of #154586 at @zooba's suggestion.

PCbuild/python.props gives free-threaded builds their own output directories, one per platform:

<BuildPath32t Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\win32t\</BuildPath32t>
<BuildPath32t Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\win32t\</BuildPath32t>
<BuildPath64t Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\amd64t\</BuildPath64t>
<BuildPath64t Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\amd64t\</BuildPath64t>
<BuildPathArm32t Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\arm32t\</BuildPathArm32t>
<BuildPathArm32t Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\arm32t\</BuildPathArm32t>
<BuildPathArm64t Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\arm64t\</BuildPathArm64t>
<BuildPathArm64t Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\arm64t\</BuildPathArm64t>

.gitignore lists the four GIL-enabled directories (win32/, amd64/, arm32/, arm64/) but none of the t counterparts, so PCbuild\build.bat --disable-gil leaves its entire output — .pdb, .lib, .exp, pybuilddir.txt, the copied LICENSE.txt, and so on — showing up as untracked files. That is easy to sweep into a commit by accident, which is exactly what happened in #154586.

This adds the four missing entries, keeping the list alphabetical.

Verified against a real -p x64 -c Release --disable-gil build tree:

$ git check-ignore -v --no-index PCbuild/amd64t/python.exe PCbuild/win32t/_freeze_module.pdb
.gitignore:127:PCbuild/amd64t/	PCbuild/amd64t/python.exe
.gitignore:134:PCbuild/win32t/	PCbuild/win32t/_freeze_module.pdb

git status is clean afterwards, where it previously listed 140 build artifacts. arm32t/ and arm64t/ are included for symmetry with the props file; I have no ARM machine to build on, so those two are matched by inspection rather than by test.

No behaviour change, so this needs the skip news label.

PCbuild/python.props places free-threaded builds in win32t, amd64t, arm32t
and arm64t, but only the GIL-enabled counterparts (win32, amd64, arm32,
arm64) were listed in .gitignore, so a --disable-gil build leaves its
output visible to git.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant