Skip to content

Build CPython out of tree with a read-only source tree #74470

Closed

Description

@vstinner
BPO 30284
Nosy @vstinner, @stratakis
PRs
  • bpo-30284: Fix regrtest for out of tree build #1481
  • [3.6] Synchronize libregrtest from master to 3.6 #2244
  • 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 2017-06-15.00:24:18.227>
    created_at = <Date 2017-05-05.16:27:13.143>
    labels = ['build', '3.7']
    title = 'Build CPython out of tree with a read-only source tree'
    updated_at = <Date 2017-06-16.12:39:11.727>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2017-06-16.12:39:11.727>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-06-15.00:24:18.227>
    closer = 'vstinner'
    components = ['Build']
    creation = <Date 2017-05-05.16:27:13.143>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 30284
    keywords = []
    message_count = 6.0
    messages = ['293121', '293125', '293126', '296044', '296052', '296186']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'cstratak']
    pr_nums = ['1481', '2244']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue30284'
    versions = ['Python 3.7']

    Activity

    1. vstinner commented on May 5, 2017

      @vstinner
      MemberAuthor

      I tried to build CPython out of the source tree with a customized read-only source tree (chmod -R -w). I got an error when running tests: tests want to write into a build/ directory... in the source tree.

      Attached patch fixes this issue.

    2. vstinner commented on May 5, 2017

      @vstinner
      MemberAuthor

      Ah, there is one and only one failing test:

      ======================================================================
      ERROR: test_synopsis_sourceless (test.test_pydoc.PydocDocTest)
      ----------------------------------------------------------------------

      Traceback (most recent call last):
        File "/home/haypo/prog/python/ro.master/Lib/test/test_pydoc.py", line 586, in test_synopsis_sourceless
          synopsis = pydoc.synopsis(filename)
        File "/home/haypo/prog/python/ro.master/Lib/pydoc.py", line 253, in synopsis
          mtime = os.stat(filename).st_mtime
      FileNotFoundError: [Errno 2] No such file or directory: '/home/haypo/prog/python/ro.master/Lib/__pycache__/os.cpython-37.pyc'
    3. vstinner commented on May 5, 2017

      @vstinner
      MemberAuthor

      test_synopsis_sourceless() should create a script, build it and test the generated .pyc file. So we control how the .pyc file is created.

    4. vstinner commented on Jun 14, 2017

      @vstinner
      MemberAuthor

      New changeset f7e0784 by Victor Stinner in branch 'master':
      bpo-30284: Fix regrtest for out of tree build (bpo-1481)
      f7e0784

    5. vstinner commented on Jun 15, 2017

      @vstinner
      MemberAuthor

      I don't think that the test_pydoc failure is very important. I'm not interested to fix it right now.

      The main blocker issue was regrtest and it's now fixed in the master branch.

      I don't recall any user complaining about issues with read-only source tree, so I don't think that it's worth it to backport the fix. If I'm wrong, please comment the issue ;-)

    6. vstinner commented on Jun 16, 2017

      @vstinner
      MemberAuthor

      New changeset a0ccc54 by Victor Stinner in branch '3.6':
      Synchronize libregrtest from master to 3.6 (bpo-2244)
      a0ccc54

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