[Distutils] distlib updated - comments sought
dholth at gmail.com
Fri Oct 5 22:36:40 CEST 2012
On Fri, Oct 5, 2012 at 3:28 PM, Stanley A. Klein <sklein at cpcug.org> wrote:
> The issue I had raised was attention to the needs of Linux packaging and
> the Filesystem Hierarchy Standard, and apparently that is under
> The response I received (from "Daniel Holth" <dholth at gmail.com>) said in
> part "The FHS issues are on the list, which is why there are "resource
> categories" that can be installed wherever in new-packaging land."
> I assume that by an "installer" you mean the combination of package
> building (done by e.g., rpmbuild) and installation (done by e.g., rpm or
> The mapping of files from the Pypi structure to the target directories is
> done at package-build time and not usually at install-time. What a
> function like bdist_rpm does is to create an rpm spec and turn the package
> building function over to rpmbuild. The file mapping is defined in the
> rpm spec and takes place during the rpmbuild processing.
> What I didn't notice in the distlib documentation were low level functions
> that would facilitate the allocation of Pypi files/directories to target
> files/directories to help in preparation of the rpm spec.
I don't think that is in distlib's problem domain at the moment; the
information about which file should go where is not generally present
in setup.py at all.
It was part of the distutils2/packaging effort to define a setup.cfg
[files] section. Similar to
but with better definitions for the category names, and a config file
to show where they should go.
Bento uses the autoconf names
prefix: install architecture-independent files
eprefix: install architecture-dependent files
bindir: user executables
sbindir: system admin executables
The next build system that's made, or Bento right now, will provide
for finding those files again at runtime even if they have been flung
to the four corners of the disk.
The wheel spec should probably be updated to understand something
about packagename-1.0.data/bindir etc.
When you are build an RPM, install-time from the Python perspective
would indeed be build-time from the RPM packager's perspective.
More information about the Distutils-SIG