[Distutils] Distributing executable binaries in eggs

Pascoe, S (Stephen) S.Pascoe at rl.ac.uk
Wed Oct 18 16:55:00 CEST 2006


I am trying create eggs for a package that relies on a compiled
executable that is distributed with the package.  I can get the
executable into the egg fine.  It is declared as package_data and I set
zip_safe=False to force easy_install to unpack the egg.
 
My problem is that the executable is always extracted without execution
permissions (our platform is UNIX).  After some experimenting this
appears to be a general problem with the zip file module not honouring
execution permissions.  I know permissions can be set in zip files
because the InfoZip tools do it.
 
Currently I have a hack working that tries to change the permissions on
the executable when the package is imported but this won't work if the
egg is installed by a different user to the importer.
 
I am wondering if there is a way round this with setuptools.  Some sort
of hook to fix permissions when unpacking a non-zipsafe egg would be
good.
 
Thanks,
Stephen.
 
---
Stephen Pascoe  01235 445980
British Atmospheric Data Centre
Rutherford Appleton Laboratory, CCLRC
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/distutils-sig/attachments/20061018/23559f07/attachment.htm 


More information about the Distutils-SIG mailing list