setuptools package_data behavior

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

Oops, typo: I've tried using package_data = {'' : ['*.glade'] } in setup.py, not package_data = {'' : '['*.glade']} as I originally wrote. The problem isn't the typo. Greg On 9/20/05, Greg Steffensen <greg.steffensen@gmail.com> wrote:
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.pybdist_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

At 03:15 PM 9/20/2005 -0400, Greg Steffensen wrote:
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,
By default, setuptools will include any file under Subversion or CVS revision control in the source distribution. If you're not using one of those revision control tools, you have to use the standard distutils MANIFEST.in rules file to specify what files to include in the source distribution. See here for more details: http://www.python.org/doc/2.4.1/dist/manifest.html
participants (2)
-
Greg Steffensen
-
Phillip J. Eby