From: Andrew S. <str...@as...> - 2007-02-24 08:23:06
|
Robert Kern wrote: > Andrew Straw wrote: > >> 1) revert to the old way. The primary issues with this are a) >> "package_data" is supported as standard Python from 2.4 on, and the old >> way required carrying our own distutils command and b) we switched the >> data directory to have a nested structure, which required code changes >> and repository layout changes that would have to be undone. >> 2) make our own distutils monkeypatch a la setuptools. Looking at >> setuptools/dist.py, this doesn't look trivial -- certainly beyond my >> free bandwidth capacity. >> > > Actually, it ought to be pretty trivial without setuptools (but compatible with > setuptools, AFAICT). Here is a Cookbook recipe that ought to work: > > http://wiki.python.org/moin/DistutilsInstallDataScattered > > That's exactly "the old way", referred to in point #1. > IPython does something similar and possibly better. > > http://ipython.scipy.org/svn/ipython/ipython/trunk/setupext/install_data_ext.py > From a quick look at the code, it's hard to determine whether this new distutils command (install_data_ext) can handle installation to a nested directory structure. Can it? If it can, there's still the question of whether we want to continue rolling our own solution or simply using Python >= 2.4's standard "package_data". AFAICT, the monkeypatching setuptools does for 2.3 to support "package_data" goes beyond adding a new distutils command. (I don't consider adding a distutils command to be monkeypatching -- that's just extending distutils is a pre-designed way.) Instead, setuptools actually replaces the distutils.dist.Distribution class with setuptools.dist.Distribution. |