[Distutils] "Python Package Management Sucks"

David Cournapeau david at ar.media.kyoto-u.ac.jp
Fri Oct 3 06:37:02 CEST 2008


Ben Finney wrote:
>
> I'm not sure exactly what you mean by “do like autoconf”. Can you
> please describe exactly what behaviour you are envisaging, so that we
> don't all have a different interpretation of what “like autoconf”
> means ?

Not autoconf, but the whole autotools suite (I think you need to use
automake at least to do what I have in mind). The idea is deceptively
simple: when you use ./configure, it gives you many options wrt paths:

  --bindir=DIR           user executables [EPREFIX/bin]
  --sbindir=DIR          system admin executables [EPREFIX/sbin]
  --libexecdir=DIR       program executables [EPREFIX/libexec]
  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
  --sharedstatedir=DIR   modifiable architecture-independent data
[PREFIX/com]
  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
  --libdir=DIR           object code libraries [EPREFIX/lib]
  --includedir=DIR       C header files [PREFIX/include]
  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
  --datarootdir=DIR      read-only arch.-independent data root
[PREFIX/share]
  --datadir=DIR          read-only architecture-independent data
[DATAROOTDIR]
  --infodir=DIR          info documentation [DATAROOTDIR/info]
  --localedir=DIR        locale-dependent data [DATAROOTDIR/locale]
  --mandir=DIR           man documentation [DATAROOTDIR/man]
  --docdir=DIR           documentation root [DATAROOTDIR/doc/libsndfile]
  --htmldir=DIR          html documentation [DOCDIR]
  --dvidir=DIR           dvi documentation [DOCDIR]
  --pdfdir=DIR           pdf documentation [DOCDIR]
  --psdir=DIR            ps documentation [DOCDIR]

By default, they are laid out more or less like the FHS (and again, the
detail do not matter: you can change them), BUT, it is extremely
flexible. The only burden for the developer is to say which files go in
which category, which he has to do anyway.

You could think that because it is autoconf, it is not flexible for
other OSes (windows), but with this, you can have extremely different
ways of packaging, which are 100 % against the FHS spirit. I gave the
gobolinux example, which does package every software in its own
directory, a bit like a super-stow if you know stow. The thing is, I am
sure the majority of softwares developers never think about this for
their own software, still it is possible: it really come for free for
the developer. And for the distributor, it is extremely easy (and
self-documented).

You could have different defaults on different platforms (windows comes
to mind).

cheers,

David


More information about the Distutils-SIG mailing list