bpo-36733: Fix PYTHONPATH for make regen-add by vstinner · Pull Request #12969 · python/cpython
Add PYTHONPATH=$(srcdir) to run $(PYTHON_FOR_REGEN) -m Parser.pgen, so it's possible to build Python from a different directory.
This is more likely a workaround. Let me see what changed the behavior before we jump to this solution.
This is more likely a workaround.
Why? For me, it's the right fix.
Let me see what changed the behavior before we jump to this solution.
Previously (1 month ago?), make regen-all didn't use Parser.pgen: https://bugs.python.org/issue36733#msg340903
I take my statement back. This is the a proper solution, we don't need to copy around pure Python code just to be able to import it.
What keeps me confused is the empty Parser directory created by configure. Should it no longer be created?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the end, something is indeed compiled to that directory. So I guess it should remain there.
This fixes the issue.
I take my statement back. This is the a proper solution, we don't need to copy around pure Python code just to be able to import it.
Thanks for the review.
What keeps me confused is the empty Parser directory created by configure. Should it no longer be created?
configure creates the empty mybuild/Parser subdirectory. I don't know why. At least, it doesn't prevent to build Python :-)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters