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

Julien Danjou julien at danjou.info
Thu Jan 29 16:37:25 UTC 2015


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.

Cheers,
-- 
Julien Danjou
;; Free Software hacker
;; http://julien.danjou.info
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 826 bytes
Desc: not available
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150129/121f6ecd/attachment.pgp>


More information about the OpenStack-dev mailing list