[Python-Dev] Unexpected behaviour in compileall
vinay_sajip at yahoo.co.uk
Wed Nov 2 12:37:52 CET 2011
I just started getting errors in my PEP 404 / pythonv branch, but they don't
at first glance appear related to the functionality of this branch. What I'm
seeing is that during installation, some of the .pyc/.pyo files written by
compileall have mode 600 rather than the expected 644, with the result that
test_compileall fails when run from the installed Python as an unprivileged
user. If I manually do
sudo chmod a+r /usr/local/lib/python3.3/__pycache__/*
then test_compileall works again.
I added a diagnostic to compileall.py, here's an extract from the log of the
Mode of [...]/__pycache__/__future__.cpython-33.pyc is 644
Mode of [...]/__pycache__/__phello__.foo.cpython-33.pyc is 644
Mode of [...]/__pycache__/_compat_pickle.cpython-33.pyc is 644
Mode of [...]/__pycache__/_dummy_thread.cpython-33.pyc is 644
Mode of [...]/__pycache__/_markupbase.cpython-33.pyc is 644
Mode of [...]/__pycache__/_pyio.cpython-33.pyc is 644
Mode of [...]/__pycache__/_strptime.cpython-33.pyc is 644
Mode of [...]/__pycache__/_sysconfigdata.cpython-33.pyc is 600
Mode of [...]/__pycache__/_threading_local.cpython-33.pyc is 644
Mode of [...]/__pycache__/_weakrefset.cpython-33.pyc is 600
Mode of [...]/__pycache__/abc.cpython-33.pyc is 600
Mode of [...]/__pycache__/aifc.cpython-33.pyc is 644
The 600s and 644s are interspersed with no pattern immediately apparent. All
the source files have mode 644, as expected.
This happens on two different Posix machines - Ubuntu Natty and OS X Leopard
- so doesn't seem to be related to the external environment.
Can anyone shed any light as to what might be going on?
More information about the Python-Dev