[openstack-dev] [oslo] Why are we continuing to add new namespaced oslo libs?

Thierry Carrez thierry at openstack.org
Thu Jan 29 17:17:52 UTC 2015

Julien Danjou wrote:
> On Thu, Jan 29 2015, Thomas Goirand wrote:
> Hi Thomas,
>> The Debian policy is that Python module packages should be named after
>> the import statement in a source file. Meaning that if we do:
>> import oslo_db
>> then the package should be called python-oslo-db.
>> This means that I will have to rename all the Debian packages to
>> remove the dot and put a dash instead. But by doing so, if OpenStack
>> upstream is keeping the old naming convention, then all the
>> requirements.txt will be "wrong" (by wrong, I mean from my perspective
>> as a package maintainer), and the automated dependency calculation of
>> dh_python2 will put package names with dots instead of dashes.
> So that's a mistake from the Debian policy and/or tools.
> The import statement is unrelated to the package name as it is published
> on PyPI. A package could provide several Python modules, for example you
> could have oslo_foo and olso_bar provided by the same package, e.g.
> example oslo.foobar or oslo_foobar.
> What's in requirements.txt are package names, not modules names. So if
> you or Debian packages in general rely on that to build the list of
> dependencies and packages name, you should somehow fix dh_python2.
> What we decided to do is to name our packages (published on PyPI) by
> oslo.something and provide one and only Python modules that is called
> oslo_something. That is totally valid.
> I understand that it's hard for you because of dh_python2 likely, but
> it's Debian tooling or policy that should be fixed.
> I'm not doing much Debian stuff nowadays, but I'll be happy to help you
> out if you need to amend the policy or clear things out with dh_python2.

The policy is actually not that strict, if I understand it correctly:

The binary package for module foo should preferably be named python-foo,
if the module name allows, but this is not required if the binary
package ships multiple modules. In the latter case the maintainer
chooses the name of the module which represents the package the most.
For subpackages such as foo.bar, the recommendation is to name the
binary packages python-foo.bar and python3-foo.bar.

That feels like a "recommendation" to me.

Thierry Carrez (ttx)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150129/0a525b67/attachment.pgp>

More information about the OpenStack-dev mailing list