On Wed, Jan 28, 2009 at 5:05 AM, David Cournapeau <david@ar.media.kyoto-u.ac.jp> wrote:
I meant that instead of installing almost everything indistinctly like
we do now with distutils/setuptools, we should have something like:

python setup.py install --bindir=foodir --sbindir=bardir --mandir=mandir
....

E.g. just copying the categories from autoconf (the ones which make
sense for python packages). So making a FHS-compliant or something like
currently done is the responsibility of the packagers -  assuming the
directories are correctly set by the developer in the setup.py. The main
problem is how to retrieve the different files when it is needed in the
package - I would guess pkg_resources would need to be modified as well
for that purpose,

In the previous discussion (somewhere, I'm too lazy to look it up) people started getting interested in the idea of an improved sdist format.  I think the basic idea was to tag files by type.  Then (I guess) you'd just do:

  python setup.py build

to get the platform-specific parts of the library built, and then move the files into place based on the descriptions of the files.  The actual tool to do this would be external to setup.py and distutils; e.g., you'd have a python-sdist-to-rpm tool, developed entirely separately from distutils or setuptools.  Potentially this would make it easier to provide your own file tags, so you could adapt a library without requiring immediate upstream support or patches.

As you mention, there would have to be some extension to pkg_resources (or an equivalent library) to handle finding these files at runtime.  Getting a runtime in place is probably the harder thing, as it is more intrusive for the upstream developers.

--
Ian Bicking  |  http://blog.ianbicking.org