Bug 1312323 - python-django-select2: Provide a Python 3 subpackage [NEEDINFO]
python-django-select2: Provide a Python 3 subpackage
Product: Fedora
Classification: Fedora
Component: python-django-select2 (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Eduardo Echeverria
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2016-02-26 07:36 EST by Tomas Orsava
Modified: 2016-09-07 07:20 EDT (History)
5 users (show)

See Also:
Fixed In Version: python-django-select2-5.8.9-1.fc26
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-09-07 07:20:00 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
dkrejci: needinfo? (echevemaster)

Attachments (Terms of Use)
Update to 5.8.9 version including Python 3 subpackage (4.11 KB, patch)
2016-08-19 12:01 EDT, Jan Beran
no flags Details | Diff
Updated spec file (4.15 KB, patch)
2016-08-19 14:08 EDT, Jan Beran
no flags Details | Diff

  None (edit)
Description Tomas Orsava 2016-02-26 07:36:57 EST
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 ok to do this in Rawhide only, however, it would be greatly
appreciated if you could push it to Fedora 24 as well.

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!

[0] https://fedoraproject.org/wiki/Packaging:Python
[1] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file
Comment 1 Dominika Krejčí 2016-06-28 05:51:15 EDT
Hi Eduardo,

Do you need any help adding Python 3 support to the RPM?

If you need more instructions, a [guide] for porting Python-based RPMs is available.

[guide] http://python-rpm-porting.readthedocs.org/en/latest/index.html
Comment 2 Jan Kurik 2016-07-26 00:15:40 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.
Comment 3 Jan Beran 2016-08-19 12:01 EDT
Created attachment 1192204 [details]
Update to 5.8.9 version including Python 3 subpackage

The patch includes
- update to version 5.8.9
- source update
- modernized specfile with Python 3 packaging
Comment 4 Tomas Orsava 2016-08-19 13:14:29 EDT
Hi Jan!
The patch looks good, only has one minor fault: The names of the subpackages.

The package name in Fedora is "python-django-select2", so we want the two subpackages to be named "python2-django-select2" and "python3-django-select2".

However, since you used the macro %{pkgname} in naming of the subpackages, you'll actually get subpackages named "python2-Django-Select2" and "python3-Django-Select2"—notice the capitalization. (Sub)package names are case sensitive, so this isn't good.

The macro %{pkgname} is there only for identifying the sources in upstream, as upstream uses the capitalisation. For Fedora subpackages we want the name in lower case, so I suggest creating a second macro %{srcname} and using that to name the subpackages.
Comment 5 Jan Beran 2016-08-19 14:08 EDT
Created attachment 1192257 [details]
Updated spec file

Hi Tomáš,

thank you for the review. I made the corrections, and attach the updated spec file.
Comment 6 Tomas Orsava 2016-08-22 04:36:25 EDT
Hi Jan,
Looks good to me!
Comment 7 Tomas Orsava 2016-08-22 04:37:43 EDT
Hi Eduardo,
as this is a bit of a time sensitive issue, we would really appreciate if you could take a look at the patch as soon as possible.
If you are time constrained right now, I hope you won't mind if we do the review and push the changes ourselves in case you are unable.

Thank you!
Comment 8 Tomas Orsava 2016-08-23 05:15:43 EDT
Here's a scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=15348391

P.S.: Before pushing, one needs to do a fedpkg new-sources.

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