Python package naming guidelines

Toshio Kuratomi a.badger at gmail.com
Thu Apr 24 23:21:15 UTC 2008


Timothy Selivanow wrote:
> I feel this is more nit-picking, but I'm currently working on packaging
> the following items (python/zope names) and need some direction:
> 
> zc.buildout
> zope.proxy
> ZConfig
> zdaemon
> zope.testing
> ZODB3
> 
> I haven't exactly liked the current naming conventions, as they leave
> way too much variation while still being "acceptable".  E.g., a package
> I have already done, pysvn, could have been named "python-pysvn" or
> "pysvn".  If it had been used as "import svn", I would have no problems
> calling it "python-svn", as that would denote that it is a python
> package having something to do with SVN (since SVN is already a
> well-known entity), but upstream calls itself "pysvn" while also using
> that as the python package name, so calling it "python-pysvn" seemed
> redundant.  However, with the above, there seems to be more ambiguity.
> 
> Adding to my naming troubles, there is already a package for
> zope.interface, which is a dependency of ZODB3, and it's name is
> python-zope-interface.  The problem I am having is that it seems to me
> that if an entity is fairly standalone, i.e. there is no ambiguity
> whether or not it is a python (or any other language)
> library/application, that the "python" prefix would be dropped.  We
> don't currently call TurboGears, "python-TurboGears" (yet there are
> other turbo-related libs that follow the python prefix scheme, e.g.
> python-turbokid and python-turbocheeta).
>
TurboGears was built before the Guideline.

(Django, OTOH, was built in violation of the guidelines and I didn't get 
to the review bug in time to get it changed)

> Really, I'm asking the Python consuming portion of the Fedora Community
> what they would rather see.  I can also take this up on the packaging
> list, but thought I'd ask here first because potentially it's the people
> on this list that would be consuming these packages.
> 
> Would it be:
> 
> python-zc-buildout
> python-zope-proxy
> python-ZConfig
> python-zdaemon
> python-zope-testing
> python-ZODB3
> python-zope (thrown in to add contrast, and I'm still working on
> packaging it...)
> 
> Or the above without the prefix?
> 
> 
> It seems to me that there should be a more firm guideline that takes
> into account python applications, python only frameworks/libs, and
> python lib ports (these seem to be the bulk of how a name would be
> determined).
> 
An application doesn't need to be prefixed with python-.

The question is, of course, if something like gourmet which has a 
module... but that module really just exists to be imported by the 
program should be gourmet or python-gourmet.  I wouldn't stop someone 
from going either way with this.

Other than that, bit... python libs and python lib ports should both be 
prefixed with python-.  A python framework should be prefixed with 
python- as well but the definition of framework is a bit ambiguous: zope 
can run standalone and therefore could be considered an application 
while TurboGears cannot run until someone creates an application that 
imports it, therefore it should definitely have been named 
python-turbogears.

So in your list, you need to decide if it's an application, an 
application which happens to have a module to support its functionality, 
or if it's a module that people are expected to use in their programs. 
If the latter, you are most likely going to want a python- prefix.... 
although you might want to have a subpackage for the application in 
corner cases where it's equally likely that someone would import a 
certain module and that someone else would run the program.

-Toshio

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
Url : http://lists.fedoraproject.org/pipermail/python-devel/attachments/20080424/891a3766/attachment.bin 


More information about the python-devel mailing list