[Distutils] Install time prefixes and data files

Tres Seaver tseaver at palladion.com
Fri Nov 13 21:25:38 CET 2009

Hash: SHA1

Floris Bruynooghe wrote:
> 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.
> +1
> 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.

I think the atual sentiment was that package authors / maintainers
weren't willingly going to add those "librarian" categories themselves,
but would mostly be happy to take patches which added them, likely from
OS distribution packagers.

> 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
> directory).

Static metadata, anyone?

- --
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the Distutils-SIG mailing list