diff options
author | Anthony Shaw <anthony.p.shaw@gmail.com> | 2020-04-29 09:09:09 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-29 09:09:09 (GMT) |
commit | 9b64ef3ac7b434065dbff0048b9103999e4b491a (patch) | |
tree | a956a6c1ed95a4aeb3bb4ba74d258f0b23c43d47 /PCbuild | |
parent | bfb1cf44658934cbcd9707fb717d6770c78fbeb3 (diff) | |
download | cpython-9b64ef3ac7b434065dbff0048b9103999e4b491a.zip cpython-9b64ef3ac7b434065dbff0048b9103999e4b491a.tar.gz cpython-9b64ef3ac7b434065dbff0048b9103999e4b491a.tar.bz2 |
bpo-40432 Fix MSBuild project for Pegen grammars (#GH-9785)
* Update the source path of the pegen target within the Windows regen project.
Change the path to Windows path formats.
* Use the more reliable SetEnv task for Cpp Projects in MSBuild.
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/regen.vcxproj | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/PCbuild/regen.vcxproj b/PCbuild/regen.vcxproj index 285a8a1..c97536f 100644 --- a/PCbuild/regen.vcxproj +++ b/PCbuild/regen.vcxproj @@ -168,7 +168,8 @@ </Target> <Target Name="_RegenPegen" BeforeTargets="Build"> <!-- Regenerate Parser/pegen/parse.c --> - <Exec Command=""$PYTHONPATH=$(srcdir)/Tools/peg_generator" "$(PythonExe)" -m pegen -q c "$(PySourcePath)Grammar\python.gram" "$(PySourcePath)Grammar\Tokens" -o "$(IntDir)parse.c"" /> + <SetEnv Name="PYTHONPATH" Prefix="true" Value="$(PySourcePath)Tools\peg_generator\" /> + <Exec Command=""$(PythonExe)" -m pegen -q c "$(PySourcePath)Grammar\python.gram" "$(PySourcePath)Grammar\Tokens" -o "$(IntDir)parse.c"" /> <Copy SourceFiles="$(IntDir)parse.c" DestinationFiles="$(PySourcePath)Parser\pegen\parse.c"> <Output TaskParameter="CopiedFiles" ItemName="_UpdatedParse" /> </Copy> |