[Distutils] Install time prefixes and data files

Floris Bruynooghe floris.bruynooghe at gmail.com
Fri Nov 13 14:04:47 CET 2009

On Fri, Nov 13, 2009 at 06:22:06PM +0900, David Cournapeau wrote:
> On Thu, Nov 12, 2009 at 12:24 AM, Wolodja Wentland
> <wentland at cl.uni-heidelberg.de> wrote:
> >
> > The FHS differentiates between various classes of files and defines
> > proper location for them. We could define platform dependent
> > standard infixes for the following data file classes for distribution
> > foo:
> >
> > * configuration     etc
> > * shared data       usr/share/foo/
> > * readme            usr/share/foo/README        README, TODO, ... could
> >                                                be automatically
> >                                                discovered
> > * examples          usr/share/foo/examples
> > * documentation     usr/share/foo/doc
> > * man files         usr/share/man
> > * variable          var/lib/foo
> > * ...
> >
> One could start from all the autoconf-defined variables such as
> prefix, eprefix, sbindir, bindir, etc... One would need in addition
> some variables for python files (.py, pyc and pyo). Then, each scheme
> would just be different mapping for those variables. For example,
> --user option just means changing prefix to $HOME/.local on linux,
> gobolinux (which as a similar file organization as mac os x) could
> easily package as they do for autoconf packages.


But don't expect all package maintainers to suddenly classify their
datafiles properly.  Last time this got discussed there was
significant opposition to this, maintainers did not see the point and
didn't want *any* change to their code at all unless it made *their*
lives easier.

Personally I think the API you proposed is reasonable and would love
to see something like that in distutils so at least distros could
patch upstream (and hopefully get it accepted).

The only issue I can see it that I'd like the API to retrieve the
data-files to work both when running from a development repository as
from an installed distribution.  Making the API methods of the
Distribution class would force you to have an installed Distribution
on you PYTHONPATH I think (as would relying on a file in the egg-info


Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org

More information about the Distutils-SIG mailing list