Write a new naming guideline for python/python3 modules?
by Chen Lei
Hi all,
It seems the current python modules naming guideline is ambiguous,
different package maintainers use different naming conventions. It
have also caused much controversy between submitter and reviewer which
is just a waste of time, so I think it's worth to write a new
python/python3 modules naming guideline for fedora. The purpose of
this discussion is decreasing inconsistent package names of python
modules in fedora. Personally, I don't mind how to name a package in
fedora as long as the naming guideline is clear and won't create much
divergence.
e.g.
1. https://bugzilla.redhat.com/show_bug.cgi?id=603245
The module name for this package is zmq, the tarball name for this
package is pyzmq. The submitter determined to use python-zmq as the
pkgname, however there are some other choice for the pkgname(e.g.
pyzmq, python-pyzmq)
2. https://bugzilla.redhat.com/show_bug.cgi?id=623425
The module name for this package is Pyside, the tarball name for this
package is pyside. The submitter determined to use python-pyside as
the pkgname, however there are some other choice for the pkgname(e.g.
python-PySide, pyside, PySide)
3. https://bugzilla.redhat.com/show_bug.cgi?id=608509
The module and tarball name for this package is subvertpy. the
submitter determined to use subvertpy as the pkgname, however there
are some other choice for the pkgname(e.g. python-subvertpy)
4. https://bugzilla.redhat.com/show_bug.cgi?id=606019
The module name for this package is setuptools, the tarball name for
this package is distribute. The submitter determined to use
python-distribute as the pkgname, however the
current maintainer want to keep the name of python-setuptools.
There are also some other divergence in fedora repos, e.g.
sympy/python-simpy, python-pycurl/pyflakes etc. There are much more
inconsistency if we consider python and python3 modules, e.g.
PyQt4/python3-PyQt4 pyke/python3-pyke.
I remember David Malcolm already wrote a naming guideline proposal for
python3 modules one year ago[1], no one objects his proposal, so I
think we can write a new packaging guideline draft based on his
proposal.
First of all, I think we should remove exception rule from guideline -
"There is an exception to this rule. If the upstream source has "py"
(or "Py") in its name, you can use that name for the package" since
we have several python runtimes in fedora/EPEL(e.g. python2/python3
for F13+ python2.4/2.6 for EPEL5) now.
Here is my draft refer to the debian naming policy[2]:
Packages of python modules (thus they rely on python as a parent) use
a slightly different naming scheme. They should be preferably named
python-$NAME where the $NAME is the name of the module that you type
to import it in a script, but this is not required if the package
ships multiple modules. In the latter case the maintainer chooses the
name which represents the package most (e.g. the upstream tarball or
project name from which this software came). There is an exception to
this rule, if the python module has a period '.' in its name, we
should replace it with a dash '-' since '.' is not an acceptable
separator for fedora.
Examples:
python-zmq/python3-zmq (tarball name pyzmq)
python-gtk/python3-gtk (tarball name pygtk)
python-PyQt4/python3-PyQt4 (tarball name PyQt)
python-MySQLdb/python3-MySQLdb (tarball name MySQL-python)
python-twisted-core (tarball name TwistedCore, the package ships
multiple modules)
python-twisted-news (tarball name TwistedNews module name twisted.news)
python-AppTools (tarball name AppTools, the package ships multiple modules)
[1]http://lists.fedoraproject.org/pipermail/python-devel/2009-October/0001...
[2]http://www.debian.org/doc/packaging-manuals/python-policy/ch-module_pac...
Thought?
Regards,
Chen Lei
13 years
python3 rpm macros not available without python3-devel installed
by Robin Lee
python3 rpm macros not available without python3-devel installed. 'rpmbuild
--viewrc' will show you.
So if you use the python3 macros to define another macro and you have no
python3-devel installed, you must fail.
So, how to define, for example, a %py3_ver macro for the major version of
Python3? Must yum be used?
Robin
13 years
What is the upstream name of the python module refer to?
by Chen Lei
Hi all,
We now start to introduce a LGPL Qt python bindings[1] into Fedora[2],
there are three different bindings available in that site to provide
bindings for qt, qt-mobilty and libmeegotouch seperately.
Refer to the fedora naming guideline, we should name a python module
as python-$NAME which the $NAME indicates the upstream name of the
python modules. I don't know what the upstream name exactly refer to -
the tarball name, the name of the module we type to import it in a
script, the name in the website, or anything else.
Take PySide for an example:
1: pyside-qt4.6+0.4.1.tar.bz2(tarball name pyside, module name PySide,
website name PySide)
2 :pyside-mobility-0.1.0.tar.bz2(tarball name pyside-mobility, module
name QtMobility, website name PySide Mobility)
3: python-meegotouch-0.1.0.tar.bz2(tarball name python-meegotouch,
module name MeeGo.Touch, website name MeegoTouch)
Is there anyone can clarify the meaning of the upstream name of a
python module? Thanks for your attention!
[1]http://www.pyside.org/
[2]https://bugzilla.redhat.com/show_bug.cgi?id=623425
Regards,
Chen Lei
13 years