Skip to content

bpo-45582: Fix test_embed failure during a PGO build on Windows - #30014

Merged
zooba merged 12 commits into
python:mainfrom
neonene:bpo-45582_pgo2
Dec 10, 2021
Merged

zooba merged 12 commits into
python:mainfrom
neonene:bpo-45582_pgo2

Conversation

@neonene

@neonene neonene commented Dec 9, 2021 •

Copy link
Copy Markdown
Contributor

PGO-instrumented _testembed.exe and getpath.py often miscalculate the prefix path, when launched with all PYTHON* envvars removed.

The new path calculation uses VPATH, which is defined as "..\\.." in pythoncore.vcxproj. From PGO-instrumented folder, VPATH needs to be "..\\..\\.." to resolve prefix.

https://bugs.python.org/issue45582

@zooba

zooba commented Dec 9, 2021

Copy link
Copy Markdown
Member

I like this change better, but maybe we should get VPATH into sysconfig so that it can be used in the test?

@zooba

zooba commented Dec 9, 2021

Copy link
Copy Markdown
Member

maybe we should get VPATH into sysconfig so that it can be used in the test?

I think adding it as sys._vpath but only on Windows is fine for this. Then sysconfig can add it into its dict if it's there.

@neonene

neonene commented Dec 10, 2021

Copy link
Copy Markdown
Contributor Author

Thank you for the nice idea. I've finished the implementation.

@zooba
zooba merged commit 3f398a7 into python:main Dec 10, 2021
@neonene
neonene deleted the bpo-45582_pgo2 branch December 11, 2021 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants