Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at
Bug 1311515 - python-cinderclient: Provide a Python 3 subpackage
Summary: python-cinderclient: Provide a Python 3 subpackage
Alias: None
Product: Fedora
Classification: Fedora
Component: python-cinderclient
Version: 25
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Haïkel Guémar
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2016-02-24 11:49 UTC by Tomas Orsava
Modified: 2016-08-17 13:22 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-08-17 13:22:59 UTC
Type: Bug

Attachments (Terms of Use)
0001-pytho3-subpackages.patch (deleted)
2016-07-16 08:32 UTC, dima
no flags Details | Diff
py3 subpackage (deleted)
2016-07-31 19:47 UTC, dima
no flags Details | Diff
0001-pytho3-subpackages (deleted)
2016-08-11 21:22 UTC, dima
no flags Details | Diff

Description Tomas Orsava 2016-02-24 11:49:55 UTC
Upstream, this software supports Python 3. Please provide a Python 3
package for Fedora.

According to the Python packaging guidelines [0], software must be
packaged for Python 3 if upstream supports it.
The guidelines give detailed information on how to do this, and even
provide an example spec file [1].

The current best practice is to provide subpackages for the two Python
versions (called "Common SRPM" in the guidelines). Alternatively, if
nothing depends on your Python2 package, you can just switch to Python 3

It's fine to do this in Rawhide only.

If anything is unclear, or if you need any kind of assistance with the
porting, you can ask on IRC (#fedora-python on Freenode), or reply here.
We'll be happy to help!


Comment 1 dima 2016-07-16 08:32:16 UTC
Created attachment 1180386 [details]

i add subpackages for python2 and python3.
is it correct way change name for subpackage for python2 from python-cinderclient to python2-cinderclient ?

Comment 2 dima 2016-07-24 09:32:22 UTC
how can i help for speed up process ?
may be you need co-maintainer ?

Comment 3 Jan Kurik 2016-07-26 04:05:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 4 Lumír Balhar 2016-07-28 09:16:09 UTC

Thank you very much for your work.

I am reviewing your patch and there are some issues which I mentioned in previous reviews (like global definition for srcname).

This package is application with some executable in %{_bindir} so it needs different approach. In current specfile you have python2 installation first which creates %{_bindir}/cinder and then python3 installation which replace this file with version built with python3. This means that you will have version buit with python3 in python2 subpackage.
You should move this file to other location after one installation process and then create some symlinks. Everything is explained in this part of guideline:

My other suggestions:
- You should add description to subpackages (You can use global definition as well)
- For documentation, you need only Python3 dependencies and documentation needs to be built only once with sphinx-build-3. In current specfile documentation is built first time with sphinx for Python2 and then replaced by build with sphinx for Python3.
- Please, use %license macro in the files section for license files instead of %doc.
- There isn't changelog entry for your changes.

Thank you and have a nice day.

Comment 5 dima 2016-07-31 19:47:39 UTC
Created attachment 1186162 [details]
py3 subpackage

added changes after review

Comment 6 Lumír Balhar 2016-08-01 09:45:15 UTC

Thanks for updated patch. There are still some issues:
- Increment release number
- Be more specific in BuildRequires and Requires - python2-pbr instead python-pbr.
- Maybe it would be better to use some global macros for 'cinder' and 'cinderclient'.

Your approach to handling binary files looks correct but please consider to use standard symlinks for both pythons version like cinder-2, cinder-2.7, cinder-3, cinder-3.5 mentioned in the guideline for this type of software.

Have a nice day.

Comment 7 Tomas Orsava 2016-08-01 09:50:10 UTC
For more detailed instructions how to properly setup these symlinks, refer to this section [0] of the Python RPM Porting guide.


Comment 8 dima 2016-08-11 21:22:37 UTC
Created attachment 1190159 [details]

spicified deps and fix links for subpackages

Comment 9 Lumír Balhar 2016-08-16 07:57:41 UTC
Hello Dmitry.

Specfile looks good but you should use preferred way to handle executables mentioned in guide instead of making symlinks in %post sections because this way is not deterministic.

Thank you for your effort.

Comment 10 Haïkel Guémar 2016-08-17 13:22:59 UTC
Fixed in rawhide.

I don't like using scriptlets for creating default symlink. But since upstream still recommends python2 as default interpreter, cinder is a symlink to python2 version. Btw, it will be at some point deprecated by openstackclient and this package will only ship a plugin to the former.

Note You need to log in before you can comment on or make changes to this bug.