From: Bob I. <bo...@re...> - 2005-06-17 20:20:27
|
On Jun 17, 2005, at 4:09 PM, John Hunter wrote: >>>>>> "Chris" == Chris Barker <Chr...@no...> writes: >>>>>> > > >> Using data_files in this manner at all is usually the wrong thing >> to do anyway. Python packages should really put the files they >> need into the package, not some semi-random location on the >> filesystem. >> > > Chris> I tend to trust Bob in these matters. What is the logic for > Chris> putting all that stuff outside of the package directory? > > I was just following the lead of the distutils documentation circa > 2003 which is when this section of setup.py written. Since distutils > had a slot for data_files, I put my data files there, which seems > reasonable even in hindsight. I'm not opposed to putting them > somewhere else, especially if someone explains the why and how. I do > try and preserve compatibility with older python versions, so 2.4 only > solutions are not a good choice at the moment. Python 2.4 distutils has the functionality built-in, otherwise you can get it from setuptools (in the Python CVS sandbox, or from <http://peak.telecommunity.com/DevCenter/PythonEggs>). There have been various other hacks throughout the years to do it, but setuptools is the standard now. py2app uses setuptools when building itself, and it is certainly Python 2.3 compatible. -bob |