Issue 36733: make regen-all doesn't work in subfolder: No module named Parser.pgen (original) (raw)
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:
$ rm -rf build && mkdir -p build/mybuild && (cd build/mybuild && ../../configure && make regen-all)
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= python3" workarounds the issue.
On branch 3.7 (3076a3e0d1), build/mybuild/Parser is also empty, but the make-regen populates it.
I'll bisect.