[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Naming of python binary packages



On Fri, 11 Aug 2023 at 14:49:00 +0000, Stefano Rivera wrote:
> > > According to the Debian Python Policy Section 4.3, binary package
> > > names should be named after the *import* name of the module, not the
> > > PyPI distribution name.
> 
> > Unfortunately, I do not agree at all with this policy. The import name has
> > no importance, and IMO, we should change that policy so that the package
> > name matches the egg-name rather than the import name.
> 
> I wouldn't quite say it has no importance. It describes which part of
> the filesystem the package owns.

More important than that, it describes the interface that the package
provides to its reverse-dependencies: changing the name changes the
interface, and vice versa. Having the package that lets you "import
dbus" systematically be installable as "python3-dbus" is the same design
principle as having the C library with SONAME libgtk-4.so.1 installable
as libgtk-4-1 (and not gtk4-libs as it would be in some distributions),
or having the Perl library that lets you "use File::chdir" installable
as libfile-chdir-perl.

This has been the policy for a while, and I think it's a good policy.
In particular, it forces the necessary conflict resolution to happen
at the distro level if two unrelated upstream projects (perhaps
pyfoo-1.egg-info and Foo-2.egg-info) are both trying to be our
implementation of "import foo".

(disclosure: I wrote some of the text in Python Policy describing the
naming convention under discussion here, but I was clarifying an existing
convention and filling in the details of what to do in corner cases,
rather than originating new policy. See also the thread starting at
https://lists.debian.org/debian-python/2019/11/msg00125.html.)

    smcv


Reply to: