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 bugzilla.redhat.com.
Bug 1309783 - python-ladon: Provide a Python 3 subpackage
Summary: python-ladon: Provide a Python 3 subpackage
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-ladon
Version: 24
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Qian Cai
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3 PY3PATCH-AVAILABLE
TreeView+ depends on / blocked
 
Reported: 2016-02-18 16:48 UTC by Petr Viktorin (pviktori)
Modified: 2017-03-11 11:50 UTC (History)
6 users (show)

Fixed In Version: python-ladon-0.9.38-3.fc27 python-ladon-0.9.38-3.fc26 python-ladon-0.9.38-2.fc25 python-ladon-0.9.38-2.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-10 15:20:57 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
python3 subpackages (deleted)
2016-07-16 22:37 UTC, dima
no flags Details | Diff
py3 subpackage, update version of lib, add license (deleted)
2016-07-31 18:37 UTC, dima
no flags Details | Diff
py3 subpackage, update version of lib, add license (deleted)
2016-07-31 18:44 UTC, dima
no flags Details | Diff
Updates and fixes (deleted)
2016-08-23 08:18 UTC, Lumír Balhar
no flags Details | Diff
Updated patch after review (deleted)
2016-08-23 14:19 UTC, Lumír Balhar
no flags Details | Diff
Patch to fix python-ladon dragging in Python 2 (deleted)
2017-02-28 15:50 UTC, Iryna Shcherbina
no flags Details

Description Petr Viktorin (pviktori) 2016-02-18 16:48:01 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
entirely.

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!


[0] https://fedoraproject.org/wiki/Packaging:Python
[1] https://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file

Comment 1 Jan Kurik 2016-02-24 15:26:14 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 24 development cycle.
Changing version to '24'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora24#Rawhide_Rebase

Comment 2 dima 2016-07-16 22:37:55 UTC
Created attachment 1180621 [details]
python3 subpackages

hello
i add python3 subpackages and update to 0.9.38 version

Comment 3 Lumír Balhar 2016-07-28 08:27:09 UTC
Hello.

Thank you for your patch. I am reviewing it and I have some suggestions:

- Is better to use global definition for module name and then this variable many times in specfile than hardcoded name. You can define global macro this way:

%global srcname ladon

and then use %{srcname} in name, source url, subpackage names, paths etc.

- When you change sw version to the newer one you should change Release back to 1%{?dist} instead of increasing it.
- Is better to be more specific in dependencies names (if applicable) - for example python2-setuptools is better than just python-setuptools.
- There are no license files. RPM should contain license file.

More information and examples can be found in this guideline: http://python-rpm-porting.readthedocs.io/en/latest/index.html

Comment 4 Lumír Balhar 2016-07-28 08:27:51 UTC
I forgot to mention that this package needs to be rebased to newest specfile version.

Comment 5 Lumír Balhar 2016-07-28 08:28:27 UTC
(In reply to Lumír Balhar from comment #4)
> I forgot to mention that this package needs to be rebased to newest specfile
> version.

*patch* not package of course :)

Comment 6 dima 2016-07-31 18:37:48 UTC
Created attachment 1186159 [details]
py3 subpackage, update version of lib, add license

py3 subpackage, update version of lib, add license

Comment 7 dima 2016-07-31 18:44:40 UTC
Created attachment 1186160 [details]
py3 subpackage, update version of lib, add license

Comment 8 Lumír Balhar 2016-08-01 08:21:10 UTC
Hello.

Patch now looks much better. Just last few points:
- You can use %{pypi_name} in %setup line, rm egg-info line, chmod & rm lines in %install and in paths in %files sections (also in name of py3 %files).
- There are missing descriptions in subpackages.

Also, could you please provide a link to Koji scratch build?

Thank you for your work.

Comment 9 Lumír Balhar 2016-08-23 08:18:48 UTC
Created attachment 1193244 [details]
Updates and fixes

Hello.

Because I've found some issues in Dmitry's patch, I've created new one and tested it in Koji and mock (build, installation and usage).

Koji scratch build: http://koji.fedoraproject.org/koji/taskinfo?taskID=15347819

Comment 10 Tomas Orsava 2016-08-23 11:25:28 UTC
Hi Lumir!
Just a few details:

1. There's no text under the %description sections of the two subpackages.

2. I believe it's preferable to make the bindir symlink use a relative path, as both files are in the same folder. I.e.:

ln -s ./%{pypi_name}-%{python2_version}-ctl %{buildroot}/%{_bindir}/%{pypi_name}-ctl

3. in the %check section there are 2 annoying warnings for 'macro-in-comment', I suggest adding a second %.

Comment 11 Lumír Balhar 2016-08-23 14:19:58 UTC
Created attachment 1193337 [details]
Updated patch after review

Hello Tomas.

Here is updated patch with fixed issues.

Thank you for review.

Comment 12 Tomas Orsava 2016-08-23 14:28:57 UTC
Looks good to me, Lumir! Good work!

Comment 13 Tomas Orsava 2016-08-23 14:29:49 UTC
Hi Matthias,
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 14 Matthias Runge 2016-08-23 14:51:36 UTC
iirc, adding a license file from somewhere else, other than package upstream is a review blocker. Please remove it and ask upstream, if they could add a license file.

Comment 15 Matthias Runge 2016-08-23 14:58:51 UTC
btw:

New in 0.9.38

    Always bundle both python versions of chardet with the source distribution.


That needs careful evaluation. I remember, I unbundled that once, back in the time, where chardet was unmaintained, and python3 version was *created* by running it through 2to3. Now

Comment 16 Lumír Balhar 2016-08-23 17:35:24 UTC
(In reply to Matthias Runge from comment #14)
> iirc, adding a license file from somewhere else, other than package upstream
> is a review blocker. Please remove it and ask upstream, if they could add a
> license file.

I've opened issue in launchpad to add license file to PyPI package [0] and I will replace source link to license file to current revision on launchpad bzr [1] in next version of patch.

[0] https://answers.launchpad.net/ladon/+question/359331
[1] http://bazaar.launchpad.net/~ladon-dev-team/ladon/ladon/download/head:/license.txt-20110711093707-sf2ym6bw134bxkep-7/LICENSE.txt?start_revid=142

(In reply to Matthias Runge from comment #15)
> btw:
> 
> New in 0.9.38
> 
>     Always bundle both python versions of chardet with the source
> distribution.
> 
> 
> That needs careful evaluation. I remember, I unbundled that once, back in
> the time, where chardet was unmaintained, and python3 version was *created*
> by running it through 2to3. Now

Is possible for you to test this package with chardet installed as dependency? If not, I think we can follow upstream suggestion and leave bundled chardet in package.

Thank you for comments.

Comment 17 Matthias Runge 2016-08-23 19:47:11 UTC
Are you sure the launchpad page is the right page for ladon? I never communicated with upstream via launchpad. 

The referenced 'question' seems to be spam, or some copy/paste issue. I always had a direct contact to Jakob, he was very nice and responsive. I just sent him a mail. Let's wait and see what happens.

I'd vote AGAINST bundling, and my last version still unbundled. Otherwise I'm fine with retiring the package, I don't use it anymore. Upstream used their bundled version to make chardet ready, iirc. The situation changed with chardet being maintained actively.

Another nit:
Source0: should be something like

https://http://files.pythonhosted.prg/packages/source/l/%{pypi_name}/%{pypi_name}-%{version}.tar.gz

Comment 18 Matthias Runge 2016-08-23 20:12:27 UTC
The license file is included in ladon for quite a while now:
http://bazaar.launchpad.net/~ladon-dev-team/ladon/ladon/view/head:/frameworks/python/LICENSE.txt

Comment 19 Lumír Balhar 2016-08-24 07:27:57 UTC
Hello.

(In reply to Matthias Runge from comment #17)
> Are you sure the launchpad page is the right page for ladon? I never
> communicated with upstream via launchpad. 

Ladon project is hosted on launchpad with all source code, issues and questions. So I think that this is the right place to submit a question.

> The referenced 'question' seems to be spam, or some copy/paste issue. I
> always had a direct contact to Jakob, he was very nice and responsive. I
> just sent him a mail. Let's wait and see what happens.

Yes, something went wrong with my question and some robot pasted some mess into my question. I have an email notification about this.

> I'd vote AGAINST bundling, and my last version still unbundled. Otherwise
> I'm fine with retiring the package, I don't use it anymore. Upstream used
> their bundled version to make chardet ready, iirc. The situation changed
> with chardet being maintained actively.

If you don't want to maintain this package anymore and you haven't anybody who wants, we can stop our porting effort and package can be retired.

Comment 20 Fedora Admin XMLRPC Client 2016-12-05 11:00:03 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 21 Fedora Admin XMLRPC Client 2016-12-21 22:58:58 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 22 Fedora Update System 2016-12-22 17:55:53 UTC
python-ladon-0.9.38-1.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-7cebe9c1c5

Comment 23 Fedora Update System 2016-12-22 17:56:08 UTC
python-ladon-0.9.38-1.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2016-a32866de98

Comment 24 Fedora Update System 2016-12-23 14:53:07 UTC
python-ladon-0.9.38-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-a32866de98

Comment 25 Fedora Update System 2016-12-23 15:22:04 UTC
python-ladon-0.9.38-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-7cebe9c1c5

Comment 26 Iryna Shcherbina 2017-02-28 15:50:45 UTC
Created attachment 1258406 [details]
Patch to fix python-ladon dragging in Python 2

Hello CAI,

thank you for the effort in switching python-ladon to Python 3.
However it needs one final touch to be Python 3 ready.

Currently, the python-ladon-0.9.38-2 RPM requires both Python 2 and Python 3. There is a stray "/usr/bin/python" shebang in one of the files, which auto-generates the dependency on Python 2 .

You may find the change needed to fix auto-generating Python 2 dependency attached. Please review and apply it.

Koji scratch build: https://koji.fedoraproject.org/koji/taskinfo?taskID=18108779

Comment 27 Qian Cai 2017-03-01 19:25:17 UTC
Applied. Thank you.

Comment 28 Fedora Update System 2017-03-02 10:37:37 UTC
python-ladon-0.9.38-2.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-49450fc141

Comment 29 Fedora Update System 2017-03-02 10:45:31 UTC
python-ladon-0.9.38-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4b0e3cb7e6

Comment 30 Fedora Update System 2017-03-03 04:53:14 UTC
python-ladon-0.9.38-2.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-49450fc141

Comment 31 Fedora Update System 2017-03-03 05:23:57 UTC
python-ladon-0.9.38-2.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4b0e3cb7e6

Comment 32 Fedora Update System 2017-03-10 15:20:57 UTC
python-ladon-0.9.38-2.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 33 Fedora Update System 2017-03-11 11:50:05 UTC
python-ladon-0.9.38-2.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.


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