[Distutils] setuptools data_files and bdist_egg

Alain Leufroy alain.leufroy at logilab.fr
Thu Mar 18 15:47:06 CET 2010

I'm a setuptools user and I appreciate it a lot, particularly for the 
automatic dependency installation and eggs.
I found over the web that one of egg features is that files shouldn't be 
strewn all over the disk. However is there a way to put files outside the egg 
install directory (e.g. /usr/share/doc) ?

The data_file list given as an argument to the setup method allows to specify 
where data files should be installed. But when I try to install a 
distribution using easy_install with an .egg file, all data files are copied 
in the egg install directory. This means that the prefix for relative path 
specified in the data_file list is the egg install directory instead of 
Is there a way to force easy_install to use <sys.prefix> as the prefix for 
relative data file paths ?

Best regards
Alain Leufroy

More information about the Distutils-SIG mailing list