[Distutils] [setuptools] include files and eggs

Ronald Oussoren ronaldoussoren at mac.com
Mon Aug 7 01:23:27 CEST 2006


Several python packages, such as Numeric, will install header files  
during installation. It seems to me that the best way to support this  
in a world of eggs is to add those include files to eggs and teach  
setuptools to use those includefiles in build_ext.

The attached patch does just that. It adds an egg_info.writer that  
writes all distribution.headers to the egg-info directory and patches  
build_ext to add header files from all active distributions to the  
include path.

I'm not entirely sure that this patch is correct, although it seems  
to work just fine. The egg_info.writer for include files adds a  
directory with files to the meta-data, the documentation and API seem  
to assume that writers will write a single file. The patch to  
build_ext feels hackish and I'm not sure if adding all active  
distributions is the right thing to do, maybe only header files from  
distributions that are mentioned as setup_requires should be added.  
That would avoid possible problems during upgrades of packages.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: setuptools-includes.patch
Type: application/octet-stream
Size: 5479 bytes
Desc: not available
Url : http://mail.python.org/pipermail/distutils-sig/attachments/20060806/98a3895d/attachment.obj 
-------------- next part --------------

More information about the Distutils-SIG mailing list