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 1317899 - tweepy: Provide a Python 3 subpackage
Summary: tweepy: Provide a Python 3 subpackage
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tweepy
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomas Orsava
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PYTHON3 PY3PATCH-PUSH
TreeView+ depends on / blocked
 
Reported: 2016-03-15 13:10 UTC by Tomas Orsava
Modified: 2016-05-25 16:17 UTC (History)
5 users (show)

Fixed In Version: tweepy-3.5.0-1.fc25
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-25 16:17:08 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
tweepy 3.6 spec (4.15 KB, text/plain)
2016-05-18 00:24 UTC, philip.worrall
no flags Details
tweepy 3.5.spec (4.37 KB, text/plain)
2016-05-19 12:36 UTC, philip.worrall
no flags Details
Patch for Python 3 support and modernization of the specfile (5.42 KB, patch)
2016-05-19 16:19 UTC, Tomas Orsava
no flags Details | Diff

Description Tomas Orsava 2016-03-15 13:10:00 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 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-05-13 11:17:58 UTC
Hello Ratnadeep,

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.io/

Comment 2 philip.worrall 2016-05-18 00:24:40 UTC
Created attachment 1158579 [details]
tweepy 3.6 spec

This is an updated and modernised spec for version 3.5 of tweepy. The one in fedora is quite old. The new spec builds a python3 subpackage.

Thanks

Comment 3 Tomas Orsava 2016-05-18 09:00:14 UTC
Hi Ratnadeep,
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 won't respond within a week.

Thank you!

Comment 4 Tomas Orsava 2016-05-19 09:58:17 UTC
Hi Phillip!

I must say, that's a very thorough patch, thank you for taking the time!

There are just a few caveats:
1. It's not possible to rename a package using a patch, so if you want the patch to work, don't rename the spec file and don't change the Name tag.
2. Instead of the Conflict tag use the Provides tag and both the Provides and Obsoletes tags need to be versioned:

Obsoletes:      %{srcname} < 3.5.0-1
Provides:       %{srcname} = %{version}-%{release}

3. The tests you have enabled in the spec file fail when I try to build the package. Did you test building the package after you made the changes?

Thank you!

Comment 5 philip.worrall 2016-05-19 12:36:41 UTC
Created attachment 1159462 [details]
tweepy 3.5.spec

Updated tweepy 3.5.spec

Comment 6 philip.worrall 2016-05-19 12:45:26 UTC
Hello Tomas,

"I must say, that's a very thorough patch, thank you for taking the time!"
Thanks I like this package its very useful.

"There are just a few caveats:
1. It's not possible to rename a package using a patch, so if you want the patch to work, don't rename the spec file and don't change the Name tag."

Ok I have renamed the spec file back to tweepy.spec

"2. Instead of the Conflict tag use the Provides tag and both the Provides and Obsoletes tags need to be versioned:"

This has been corrected.

"3. The tests you have enabled in the spec file fail when I try to build the package. Did you test building the package after you made the changes?"

After a bit of investigation the test suite can only be run successfully when you have provided a valid set of API credentials in tests/config.py. The test suite also requires internet access to enable it. As debian has done i have disabled the test suite for now, perhaps later they will separate out the few tests that dont need any online credentials [1]

I tested it on fc23 but i have just verified the build using mock and against rawhide.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=814464

Comment 7 Tomas Orsava 2016-05-19 16:19:39 UTC
Created attachment 1159538 [details]
Patch for Python 3 support and modernization of the specfile

Thanks for those changes Philip!

I hope you won't mind I modified the patch a bit so we can push it:
- I changed the Name tag back to tweepy
- I made the tests optional instead of removing them (that would be wasted work!) and added a comment
- Changed the dependencies back to `python-requests-oauthlib` and `python-simplejson` as they are not provided under the `python2-` names
- Reverted back to 3.5.0

Sadly the 3.6.0 version is officially not released. The last commit does say 3.6.0, but maybe the author wants to follow it up with bugfixes or the like. Because neither of us is the official maintainer of the package I think we should stick to officially released versions.

What I would suggest to you, however, is to ask the current maintainer(s) of the package to make you a co-maintainer. since you are currently the best man for the yob, and then you can update to 3.6.0.

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


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