From Fedora Project Wiki
(original)
(bugfixes :))
 
(One intermediate revision by one other user not shown)
Line 9: Line 9:
gnome-applet-netmon (netmon applet for gnome, relies on gnome)
gnome-applet-netmon (netmon applet for gnome, relies on gnome)
php-adodb (adodb functionality for php, relies on php)
php-adodb (adodb functionality for php, relies on php)
python-twisted (the twisted module for python, relies on python)
python3-twisted (the twisted module for python3, relies on python3)
xmms-cdread (direct cd read functionality for xmms, relies on xmms)
xmms-cdread (direct cd read functionality for xmms, relies on xmms)
</pre>
</pre>
Line 17: Line 17:
There are some exceptions to this general addon package naming policy, and they are noted below.<BR>
There are some exceptions to this general addon package naming policy, and they are noted below.<BR>


{{Anchor|AddonPython}}
{{Anchor|AddonPython2}}
== Addon Packages (python modules) ==
== Addon Packages (python2 modules) ==
Packages of python modules (thus they rely on python as a parent) use a slightly different naming scheme. They should take into account the upstream name of the python module. This makes a package name format of <code>python-$NAME</code>. When in doubt, use the name of the module that you type to import it in a script.
Packages of python2 modules (thus they rely on python2 as a parent) use a slightly different naming scheme. They should take into account the upstream name of the python module. This makes a package name format of <code>python2-$NAME</code>. When in doubt, use the name of the module that you type to import it in a script.


'''Examples: '''
'''Examples: '''
<pre>
<pre>
python-psycopg  (python module named psycopg)
python2-psycopg  (python module named psycopg)
python-simpletal (python module named simpletal)
python2-simpletal (python module named simpletal)
python-tpg (python module named tpg)
python2-tpg (python module named tpg)
</pre>
</pre>
In the past, just the <code>python</code> prefix was used. Those packages are still OK, but new packages should always use the <code>python2</code> prefix for python2 subpackages, and <code>python</code> prefix should only be used for source packages.


When a module has a dot in its name, the [[#Separators| usual rule]] about changing "." to "-" applies.
When a module has a dot in its name, the [[#Separators| usual rule]] about changing "." to "-" applies.
Line 34: Line 36:
== Addon Packages (python3 modules) ==
== Addon Packages (python3 modules) ==


An rpm with a <code>python</code> prefix means a python2 rpm so we need a different prefix to denote python3 packages.  For this, we use <code>python3</code>.  We have two constraints that the python2 packages don't operate under:
An rpm with a <code>python</code> or <code>python2</code> prefix currently means a python2 rpm so we need a different prefix to denote python3 packages.  For this, we use <code>python3</code>.  We have two constraints that the python2 packages don't operate under:


<ol>
<ol>
Line 43: Line 45:
So all python3 modules '''MUST''' have python3 in their name.  Other than that, the module must be in the same format as the python2 package.  Some examples:
So all python3 modules '''MUST''' have python3 in their name.  Other than that, the module must be in the same format as the python2 package.  Some examples:
{|
{|
! Fedora python 2 package !! Upstream name !! Fedora Python 3 package name
! Fedora python 2 package using the old naming scheme !! Upstream name !! Fedora Python 3 package name
|-
|-
| python-lxml            || lxml          || python3-lxml
| python-lxml            || lxml          || python3-lxml

Latest revision as of 09:58, 18 May 2016

Addon Packages (General)

If a new package is considered an "addon" package that enhances or adds a new functionality to an existing Fedora package without being useful on its own, its name should reflect this fact.

The new package ("child") should prepend the "parent" package in its name, in the format: %{parent}-%{child}.

Examples:

gnome-applet-netmon (netmon applet for gnome, relies on gnome)
php-adodb (adodb functionality for php, relies on php)
python3-twisted (the twisted module for python3, relies on python3)
xmms-cdread (direct cd read functionality for xmms, relies on xmms)

When the addon package is a language binding, note that the language itself is always the parent. Thus, a lua binding for the "randomdb" database would be lua-randomdb, not randomdb-lua. Also note that some packages may have grandfathered names using the opposite ordering.

There are some exceptions to this general addon package naming policy, and they are noted below.

Addon Packages (python2 modules)

Packages of python2 modules (thus they rely on python2 as a parent) use a slightly different naming scheme. They should take into account the upstream name of the python module. This makes a package name format of python2-$NAME. When in doubt, use the name of the module that you type to import it in a script.

Examples:

python2-psycopg  (python module named psycopg)
python2-simpletal (python module named simpletal)
python2-tpg (python module named tpg)

In the past, just the python prefix was used. Those packages are still OK, but new packages should always use the python2 prefix for python2 subpackages, and python prefix should only be used for source packages.

When a module has a dot in its name, the usual rule about changing "." to "-" applies.

Addon Packages (python3 modules)

An rpm with a python or python2 prefix currently means a python2 rpm so we need a different prefix to denote python3 packages. For this, we use python3. We have two constraints that the python2 packages don't operate under:

  1. We need to be clear about these modules being for python3. Some python2 packages are named using an old, removed exception that allowed them to omit the "python-" prefix if they already had "py" in their names. No such exception has ever existed for python3 modules.
  2. Consumers of the packages need to be able to find them even if they don't know whether they're using the python2 or python3 version.

So all python3 modules MUST have python3 in their name. Other than that, the module must be in the same format as the python2 package. Some examples:

Fedora python 2 package using the old naming scheme Upstream name Fedora Python 3 package name
python-lxml lxml python3-lxml
gstreamer-python gst-python gstreamer-python3
gnome-python2 gnome-python gnome-python3
rpm-python (part of rpm) rpm-python3
python-pygments pygments python3-pygments
pygtk2
(grandfathered in. Named using
a now removed exception)
pygtk python3-pygtk