Building a binary package of matplotlib for OS-X

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.

    > I tend to trust Bob in these matters. What is the logic for
    > 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.

JDH

Python 2.4 distutils has the functionality built-in, otherwise you can get it from setuptools (in the Python CVS sandbox, or from <PythonEggs&gt;\ - The PEAK Developers' Center). 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

···

On Jun 17, 2005, at 4:09 PM, John Hunter wrote:

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.

    > I tend to trust Bob in these matters. What is the logic for
    > 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.