Bug 1309783 - python-ladon: Provide a Python 3 subpackage
python-ladon: Provide a Python 3 subpackage
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: python-ladon (Show other bugs)
24
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: CAI Qian
Fedora Extras Quality Assurance
:
Depends On:
Blocks: PYTHON3 PY3PATCH-AVAILABLE
  Show dependency treegraph
 
Reported: 2016-02-18 11:48 EST by Petr Viktorin
Modified: 2017-03-11 06:50 EST (History)
6 users (show)

See Also:
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:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-03-10 10:20:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
python3 subpackages (3.49 KB, patch)
2016-07-16 18:37 EDT, dima
no flags Details | Diff
py3 subpackage, update version of lib, add license (4.09 KB, patch)
2016-07-31 14:37 EDT, dima
no flags Details | Diff
py3 subpackage, update version of lib, add license (4.08 KB, patch)
2016-07-31 14:44 EDT, dima
no flags Details | Diff
Updates and fixes (5.04 KB, patch)
2016-08-23 04:18 EDT, Lumír Balhar
no flags Details | Diff
Updated patch after review (5.08 KB, patch)
2016-08-23 10:19 EDT, Lumír Balhar
no flags Details | Diff
Patch to fix python-ladon dragging in Python 2 (1.23 KB, application/mbox)
2017-02-28 10:50 EST, Iryna Shcherbina
no flags Details

  None (edit)
Description Petr Viktorin 2016-02-18 11:48:01 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
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 10:26:14 EST
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 18:37 EDT
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 04:27:09 EDT
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 04:27:51 EDT
I forgot to mention that this package needs to be rebased to newest specfile version.
Comment 5 Lumír Balhar 2016-07-28 04:28:27 EDT
(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 14:37 EDT
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 14:44 EDT
Created attachment 1186160 [details]
py3 subpackage, update version of lib, add license
Comment 8 Lumír Balhar 2016-08-01 04:21:10 EDT
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 04:18 EDT
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 07:25:28 EDT
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 10:19 EDT
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 10:28:57 EDT
Looks good to me, Lumir! Good work!
Comment 13 Tomas Orsava 2016-08-23 10:29:49 EDT
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 10:51:36 EDT
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 10:58:51 EDT
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 13:35:24 EDT
(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 15:47:11 EDT
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 16:12:27 EDT
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 03:27:57 EDT
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 06:00:03 EST
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 17:58:58 EST
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 12:55:53 EST
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 12:56:08 EST
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 09:53:07 EST
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 10:22:04 EST
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 10:50 EST
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 CAI Qian 2017-03-01 14:25:17 EST
Applied. Thank you.
Comment 28 Fedora Update System 2017-03-02 05:37:37 EST
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 05:45:31 EST
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-02 23:53:14 EST
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 00:23:57 EST
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 10:20:57 EST
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 06:50:05 EST
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.