You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build CPython out of tree with a read-only source tree #74470
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=<Date2017-06-15.00:24:18.227>created_at=<Date2017-05-05.16:27:13.143>labels= ['build', '3.7']
title='Build CPython out of tree with a read-only source tree'updated_at=<Date2017-06-16.12:39:11.727>user='https://github.com/vstinner'
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.
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'
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 ;-)
Activity
vstinner commentedon May 5, 2017
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.
vstinner commentedon May 5, 2017
Ah, there is one and only one failing test:
======================================================================
ERROR: test_synopsis_sourceless (test.test_pydoc.PydocDocTest)
----------------------------------------------------------------------
vstinner commentedon May 5, 2017
test_synopsis_sourceless() should create a script, build it and test the generated .pyc file. So we control how the .pyc file is created.
vstinner commentedon Jun 14, 2017
New changeset f7e0784 by Victor Stinner in branch 'master':
bpo-30284: Fix regrtest for out of tree build (bpo-1481)
f7e0784
vstinner commentedon Jun 15, 2017
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 ;-)
vstinner commentedon Jun 16, 2017
New changeset a0ccc54 by Victor Stinner in branch '3.6':
Synchronize libregrtest from master to 3.6 (bpo-2244)
a0ccc54