I'm trying to include some data files in a python package using the setuptools package_data option. I'm then accessing the files with pkg_resources. This works perfectly when the python .egg file is installed as-is (i.e. still zipped). But when the egg file is unzipped during installation, the data files are not installed.
In other words, if I run: python setup.py bdist_egg cd dist sudo easy_install -z EnrichPy-0.1.001-py2.6.egg then the egg file is installed (with the data safely zipped inside) and everything works. On the other hand, if I run sudo easy_install -Z EnrichPy-0.1.001-py2.6.egg then the data files are not installed. I have a directory called EnrichPy-0.1.001-py2.6.egg/enrichpy/ under dist-packages, but it contains only my source files, not my data files. Can anyone suggest what I need to do to get the package_data files to be installed when easy_install unzips the egg file? Notes: The package is available at http://github.com/roban/EnrichPy I can test it by running: import enrichpy.yields enrichpy.yields.Data_vdHG().data If that exits without errors, then pkg_resources is finding the installed data. I asked this question on stackoverflow without response: http://stackoverflow.com/questions/4043315/package-data-not-installed-from-python-egg-file -- Roban Hultman Kramer Zwicky Fellow Institute for Astronomy ETH Zürich (Swiss Federal Institute of Technology) _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
