Skip to content

bpo-36733: Fix PYTHONPATH for make regen-add #12969

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

Merged
merged 1 commit into from
Apr 26, 2019
Merged

bpo-36733: Fix PYTHONPATH for make regen-add #12969

merged 1 commit into from
Apr 26, 2019

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Apr 26, 2019

Add PYTHONPATH=$(srcdir) to run $(PYTHON_FOR_REGEN) -m Parser.pgen,
so it's possible to build Python from a different directory.

https://bugs.python.org/issue36733

Add PYTHONPATH=$(srcdir) to run $(PYTHON_FOR_REGEN) -m Parser.pgen,
so it's possible to build Python from a different directory.
@hroncok
Copy link
Contributor

hroncok commented Apr 26, 2019

This is more likely a workaround. Let me see what changed the behavior before we jump to this solution.

@vstinner
Copy link
Member Author

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

@vstinner vstinner requested a review from pablogsal April 26, 2019 10:29
@hroncok
Copy link
Contributor

hroncok commented Apr 26, 2019

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?

Copy link
Contributor

@hroncok hroncok left a comment

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.

@vstinner
Copy link
Member Author

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 :-)

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