Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2019-04-26.11:10:06.909>created_at=<Date2019-04-26.10:17:42.615>labels= ['build', '3.8', '3.9']
title="make regen-all doesn't work in subfolder: No module named Parser.pgen"updated_at=<Date2019-04-26.11:10:58.280>user='https://github.com/hroncok'
Activity
hroncok commented on Apr 26, 2019
When I attempt to build CPython from a subfolder (as we do in Fedora) make regen-all dies with:
python3.8 -m Parser.pgen ../../Grammar/Grammar \
../../Grammar/Tokens \
../../Include/graminit.h.new \
../../Python/graminit.c.new
/usr/bin/python3.8: No module named Parser.pgen
To reproduce, run:
This is probably a regression, as it works in the 3.7 branch.
Setting PYTHON_FOR_REGEN="python3" (python3.7 on my system) doesn't make a difference:
python3 -m Parser.pgen ../../Grammar/Grammar \
../../Grammar/Tokens \
../../Include/graminit.h.new \
../../Python/graminit.c.new
/usr/bin/python3: No module named Parser.pgen
build/mybuild/Parser exists but it is empty directory.
Setting PYTHON_FOR_REGEN="PYTHOINPATH=<path_to_sources> python3" workarounds the issue.
On branch 3.7 (3076a3e), build/mybuild/Parser is also empty, but the make-regen populates it.
I'll bisect.
vstinner commented on Apr 26, 2019
regen-keyword is recent: bpo-36143.
regen-grammar has been modified to use Parser.pgen in bpo-35808.
hroncok commented on Apr 26, 2019
1f24a71
vstinner commented on Apr 26, 2019
New changeset 06d04e7 by Victor Stinner in branch 'master':
bpo-36733: Fix PYTHONPATH for make regen-add (GH-12969)
06d04e7
vstinner commented on Apr 26, 2019
Thanks for your bug report Miro Hrončok. The fix will be part of the next Python 3.8 alpha release:
"3.8.0 alpha 4: Monday, 2019-04-29"
https://www.python.org/dev/peps/pep-0569/