Skip to content

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