[Distutils] setuptools package_data behavior

Greg Steffensen greg.steffensen at gmail.com
Tue Sep 20 21:15:59 CEST 2005


Hey, I'm trying to use setuptools (which looks extremely cool) to distribute 
a reasonably simple python package (clipartbrowser on pypi, if anyone's 
curious), and am running into difficulty figuring out how to include some 
data files. My package is more or less laid out as follows (based on the 
example layout provided in Ian's setuptools presentation):

clipartbrowser/
README
COPYING
ez_setup.py
setup.py
clipartbrowser/
__init__.py
browser.py
clipartbrowser.glade
repositories/
__init__.py
localocal.py
localocal.glade

I already have the code setup to use pkg_resources to access the data files 
(clipartbrowser.glade and localocal.glade), and have tried to list them 
under package_data in setup.py several ways (including "package_data = {'' : 
'['*.glade']} " ), but they never seem to be included in the tarball when I 
use "setup.py sdist". They are included when I do "setup.py bdist_egg", but 
for now I'd rather distribute using traditional tarballs. Am I doing 
something wrong?

Also, the README is magically included in the sdist tarball no matter what I 
do, but I'd like to include COPYING, AUTHORS, etc. Is there a "correct" way 
to do this? Thanks,

Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/distutils-sig/attachments/20050920/3c59715b/attachment.htm


More information about the Distutils-SIG mailing list