[Distutils] [Python Language Summit] Distutils / Packaging survey

Ben Finney ben+python at benfinney.id.au
Sun Feb 1 23:26:52 CET 2009


Ian Bicking <ianb at colorstudy.com> writes:

> I'm just about ready to run screaming from this discussion... so no,
> I want no part of determining what the "right" place for these files
> is

As I understand it, you are speaking from the perspective of a
“developer”; that is, someone who intends to share the software work
you've written, but leave the packaging of that work for particular
OSen to other people.

In that case, you're *not* being asked to determine what the “right”
installation location of files is; that's exactly the shift in control
that's being requested here, by divorcing the decision about what the
*purpose* of a file is from what its installed *location* will be.

Instead, you're being asked only to determine which category a file
belongs to; and those categories are (modulo some historical quirks,
due to David's obvious strong preference for the C-language-focussed
‘autoconf’) mostly about the *purpose* of a file — precisely to allow
that determination to be made without the same person needing to know
about install locations.

> I imagine some file like package-data.conf, containing:
> 
> data mypackage/templates/
> docs docs/_build/
> 
> At least in this example the first word is some tag, and the second
> is the directory, or files, or maybe a wildcard or something
> determining what files that tag applies to. Everything not declared
> but present in a package (or as a module) would default to "lib",
> and everything outside of that (like the setup.py file) would be
> "ignore".

This is (with implementation differences) entirely compatible with
what David's proposing, AFAICT.

The message you responded to, though, was discussing the complementary
part: the install location of (in your example) ‘docs’, ‘data’, ‘lib’,
etc. If you want no part of that, you're welcome to avoid it; and
that's exactly the kind of partition that is being striven for here.

> On installation, you'd write something like
> mypackage.egg-info/file-locations.txt, that might look like:
> 
> mypackage/templates/ -> /usr/share/mypackage/templates/
> docs/_build/ -> /usr/share/doc/mypackage
> 
> (I'm not sure what the syntax would look like, but whatever.)

Here, though, you lose the very useful categorisation you set up
above. AIUI, David is proposing that install location be a mapping not
from file path to file path, but from file *purpose* (as categorised
above) to install file path.

-- 
 \     “For every complex problem, there is a solution that is simple, |
  `\                               neat, and wrong.” —Henry L. Mencken |
_o__)                                                                  |
Ben Finney



More information about the Distutils-SIG mailing list