FAQ
I'm trying to use distutils to install some package data and
additional files, some of which may be executable. It turns out that
distutils does not preserve the permissions. Digging in the code,
there is the following comment on distutils/command/build_py:

# XXX copy_file by default preserves mode, which appears to be
the
# wrong thing to do: if a file is read-only in the working
# directory, we want it to be installed read/write so that the
next
# installation of the same module distribution can overwrite
it
# without problems. (This might be a Unix-specific issue.)
Thus

If the only reason for not preserving the mode is ensuring it's read/
write, why not preserve the rest permissions and set the write flag
for the owner ? The comment continues:

# we turn off 'preserve_mode' when copying to the build
directory,
# since the build directory is supposed to be exactly what the
# installation will look like (ie. we preserve mode when
# installing).

But installing copies from the build dir which has forgotten the
original permissions, so there is no actual preservation! Am I reading
this wrong or should I submit a bug report ?

George

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppython-list @
categoriespython
postedJan 14, '09 at 6:44p
activeJan 14, '09 at 6:44p
posts1
users1
websitepython.org

1 user in discussion

George Sakkis: 1 post

People

Translate

site design / logo © 2022 Grokbase