[Distutils] Install time prefixes and data files

David Cournapeau cournape at gmail.com
Fri Nov 13 10:22:06 CET 2009


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.

For data files, the major problems currently in distutils are:
 -  that you cannot 'tag' the different kind of data files. Tarek
suggestion of using ('$variable_name', [list of files]) is one way of
solving this. One could also imagine having an argument to setup per
type (man_files=(list of files), etc...).
  - One should think about defining its own data 'type' as well. For
example, let's say application MegaBar can be extended through python
plugins. You may want to add your plugin to MegaBar plugin directory:
($megabar_dir, [list of files for megabar plugins]). megabar_dir value
should be customizable from the build process.

cheers,

David


More information about the Distutils-SIG mailing list