Skip to content

make regen-all doesn't work in subfolder: No module named Parser.pgen #80914

Description

@hroncok
mannequin
BPO 36733
Nosy @vstinner, @hroncok, @pablogsal
PRs
  • bpo-36733: Fix PYTHONPATH for make regen-add #12969
  • 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 = None
    closed_at = <Date 2019-04-26.11:10:06.909>
    created_at = <Date 2019-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 = <Date 2019-04-26.11:10:58.280>
    user = 'https://github.com/hroncok'

    bugs.python.org fields:

    activity = <Date 2019-04-26.11:10:58.280>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-04-26.11:10:06.909>
    closer = 'vstinner'
    components = ['Build']
    creation = <Date 2019-04-26.10:17:42.615>
    creator = 'hroncok'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 36733
    keywords = ['patch']
    message_count = 5.0
    messages = ['340902', '340903', '340904', '340909', '340910']
    nosy_count = 3.0
    nosy_names = ['vstinner', 'hroncok', 'pablogsal']
    pr_nums = ['12969']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue36733'
    versions = ['Python 3.8', 'Python 3.9']

    Linked PRs

    Activity

    1. hroncok commented on Apr 26, 2019

      hroncokmannequin
      MannequinAuthor

      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=<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.

    2. vstinner commented on Apr 26, 2019

      @vstinner
      Member

      regen-keyword is recent: bpo-36143.

      regen-grammar has been modified to use Parser.pgen in bpo-35808.

    3. hroncok commented on Apr 26, 2019

      hroncokmannequin
      MannequinAuthor
    4. vstinner commented on Apr 26, 2019

      @vstinner
      Member

      New changeset 06d04e7 by Victor Stinner in branch 'master':
      bpo-36733: Fix PYTHONPATH for make regen-add (GH-12969)
      06d04e7

    5. vstinner commented on Apr 26, 2019

      @vstinner
      Member

      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/

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.8 (EOL)end of life3.9 (EOL)end of lifebuildThe build process and cross-build

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions