
On 23 February 2000, Brian Takashi Hooper said:
I was wondering what the convention is for including binary data files with the installation of a module. Like say I had a table called table.data, that I wanted to have be installed with everything else on python setup.py install - should the data file be part of install_py, or install_ext, or something else?
Convention? There is no convention! Distutils currently handles the installation of precisely two types of files: pure Python modules and Python extension modules. Anything else and you're on your own.
The good news is, the system is extensible: it's not too hard to augment the standard "install" command to handle whatever type of file interests you. See the NumPy setup script distributed with recent versions of NumPy for an example; visit this charming URL to see it directly:
http://cvs.sourceforge.net/cgi-bin/cvsweb.cgi/Numerical/setup.py?rev=1.8&...
Anyways, what is the nature of this data file? Is it platform-neutral? Does it have anything to do with Python, or is it just an artifact of your project? Under Unix, /usr/share/<your-project> or /usr/lib/<your-project> would probably be good places for it (depending on whether it's platform-neutral or not).
We'd like to use distutils to package up a current project, but weren't sure about this point, and couldn't find it in the docs...
Docs? What docs? ;-) (Don't worry, I'm getting to that!)
Greg