Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 12 commits into from
Dec 10, 2021
Merged

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

merged 12 commits into from
Dec 10, 2021

Conversation

neonene
Copy link
Contributor

@neonene neonene commented Dec 9, 2021

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
Copy link
Member

zooba commented Dec 9, 2021

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

@zooba
Copy link
Member

zooba commented Dec 9, 2021

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
Copy link
Contributor Author

neonene commented Dec 10, 2021

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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants