At 10:25 PM 1/25/2006 -0500, Stefan Seefeld wrote: >IIUC, this works if and because 'bar.dat' is located somewhere >under pkg_dir, right ?
Yes. This is pretty much the only sane way to bundle read-only data files with a Python package. >The traditional way of installing 'data files' >on unix-like systems, however, is to keep them in <prefix>/share, I believe that's only if they're read-only, in which case there's no reason not to put them in a package directory, tradition notwithstanding. :) >and the python modules in <prefix>/lib/python-<version>/site-packages, >and there doesn't appear to be a platform-independent path from >python module to data dir. Which is why the sane way to do it for Python is to put them in a package directory; it ensures that you can find them using the same code regardless of platform. >Unfortunately I don't think I can change the directory layout to >relocate the data files into a subdirectory of my toplevel python >package. Why not? _______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
