
On Fri, Feb 28, 2003 at 10:31:00AM -0500, Jeremy Hylton wrote:
We often store data files in a package directory. Zope components sometimes have configuration files, presentation files like html and images, and other data. One common case is unit test packages, which often have test data in them. In all these cases, we find it useful to access the data files by loading them from the package directory. You get the package's __path__ attribute and look for data files in that directory.
The problem is that distutils won't install these files for us. It ends up being a lot of work to get the files installed. You need to provide a custom distclass to copy the files at build and install time. It would be a lot more convenient if distutils would just install the files by default.
Attached to this mail is a Distutils extension I coded to install twisted tml file, but it works fine to install any other file in a python package. Feel free to use, modify and distribute. -- Alexandre Fayolle LOGILAB, Paris (France). http://www.logilab.com http://www.logilab.fr http://www.logilab.org Développement logiciel avancé - Intelligence Artificielle - Formations