-
-
Notifications
You must be signed in to change notification settings - Fork 34.4k
FindPythonForBuild (PCBuild) fails with a path that contains a space #92348
Description
Bug report
I discovered this while playing around building with VS 2022 (I know it's not supported yet).
FindPythonForBuild tries to execute a batch file (find_python.bat) and builds the path as such:
$(MSBuildThisFileDirectory)\find_python.bat
If you clone the CPython repo into a user profile Documents directory (as is the default for the GitHub frontend for windows), and your user profile contains a space, this script fails.
Locally changing the line to add encoded quotes like this works for me:
<Exec Command=""$(MSBuildThisFileDirectory)\find_python.bat" -q"
You could probably repro this by cloning into any directory with a space in the path.
Your environment
- CPython versions tested on: latest main HEAD
- Operating system and architecture: Windows 10
- Visual Studio 2022
- User profile name:
Lucius Riccio(yes, I still have a hand-me-down :))
CC @zooba since I think he still owns this code? It looks like the PSF has moved to GitHub for issue tracking, it will take a few minutes for me to reconfigure everything locally to fork this properly if you want me to submit a one-line patch.