This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gsakkis
Recipients gsakkis, tarek
Date 2009-02-17.21:54:52
SpamBayes Score 1.9042457e-07
Marked as misclassified No
Message-id <1234907694.25.0.317480697226.issue5300@psf.upfronthosting.co.za>
In-reply-to
Content
Distutils ignores file permissions when copying modules and package_data
files to the build directory, and consequently to the installation
directory too. According to an XXX comment at
distutils/command/build_py.py, this is deliberate so that the built
files are not read-only, which would be a nuisance when rebuilding. This
problem though could be solved by just setting the write flag for the
user (chmod u+w) instead of overwriting all the flags. In my case, some
executable files ceased to be executable after installation.

I believe that the default behavior should be changed to preserve all
permissions, with the possible exception of setting u+w. Even that might
be unnecessary; AFAIK to delete a file you need write permissions only
to its parent directory, not to the file itself.

Even if the current behavior is deemed correct, at the very least the
code should be refactored to allow easy overriding. Currently
build_module and build_package_data pass preserve_mode=False in their
body, so I had to copy and paste the whole methods just to set
preserve_mode=True.
History
Date User Action Args
2009-02-17 21:54:54gsakkissetrecipients: + gsakkis, tarek
2009-02-17 21:54:54gsakkissetmessageid: <1234907694.25.0.317480697226.issue5300@psf.upfronthosting.co.za>
2009-02-17 21:54:53gsakkislinkissue5300 messages
2009-02-17 21:54:52gsakkiscreate