Bug 1433650

Summary: python-pygments: nothing provides python2-pygments
Product: [Fedora] Fedora Reporter: Carl George <carlwgeorge>
Component: python-pygmentsAssignee: Steve Milner <smilner>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: smilner
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: python-pygments-2.2.0-7.fc25 python-pygments-2.2.0-7.fc26 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-30 01:20:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carl George 2017-03-19 01:08:59 UTC
Description of problem:
This package is not following the Fedora Packaging Guidelines for Python.
Nothing currently provides python2-pygments.  This can be resolved with a
virtual provides or by changing the subpackage layout so that there are
python2-pygments and python3-pygments subpackages.

Additional info:
http://fedoraproject.org/wiki/Packaging:Python#Provides
http://fedoraproject.org/wiki/Packaging:Python#Example_common_spec_file

Comment 1 Steve Milner 2017-03-20 14:17:47 UTC
Thanks for the report. I'll update the spec shortly and push to master. If you don't mind, I'd appreciate a review of the changes.

Comment 2 Carl George 2017-03-20 14:34:40 UTC
Of course!  Thanks for the quick response.

Comment 3 Steve Milner 2017-03-20 14:40:56 UTC
Thanks Carl,

The updated spec can be found at http://pkgs.fedoraproject.org/cgit/rpms/python-pygments.git/tree/.

Comment 4 Carl George 2017-03-20 18:17:32 UTC
Seeing as EL5 goes EOL in 10 days, do you want to remove the python26 stuff?

There are a few fixes from the packaging guidelines I would recommend:
- The contents of the buildroot SHOULD NOT be removed in the first line of %install.
- The BuildRoot: tag, Group: tag, and %clean section SHOULD NOT be used.
- The %defattr directive in the %files list SHOULD ONLY be used when setting a non-default value
- Man page compression method may change, so use a wildcard pattern (%{_mandir}/man1/pygmentize.1*)
- Don't use the unversioned %{__python} and %{python_sitelib} macros (use %{__python2} and %{python2_sitelib} instead)
- Mark the LICENSE file as %license, not %doc

It looks like the docs are only built under Python 2, not Python 3.  Is it beneficial to build them under both?  Or should python3-sphinx be removed as a build requirement?

If you wrap the python3 things in 0%{?fedora} conditionals, the spec file can be merged back to the EPEL6/7 branches to ease future maintenance.

For better future compatibility, the Python 2 requirements can be specified with a conditional "2" to reference the exact Fedora package name.
BuildRequires: python%{?fedora:2}-setuptools

Comment 5 Steve Milner 2017-03-22 13:57:08 UTC
Good call. I'll drop the 26 stuff and will update the spec. Thanks for the review! I've been trying to rework this spec for a bit!

Comment 6 Carl George 2017-03-22 19:57:27 UTC
Thanks for making those fixes, it looks much better now.  Sorry to nitpick, just one last thing...

-%{python_sitelib}/*
+%{python2_sitelib}/*

Also, would you mind merging these fixes back to the f25 and f26 branches as well?

Comment 7 Steve Milner 2017-03-23 18:46:44 UTC
Updated and merged.

Comment 8 Carl George 2017-03-23 19:04:06 UTC
Looks great!  I'll be happy to add karma once the bodhi links come through.

Comment 9 Fedora Update System 2017-03-23 19:39:32 UTC
python-pygments-2.2.0-7.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-3ceb94d98d

Comment 10 Fedora Update System 2017-03-23 19:39:53 UTC
python-pygments-2.2.0-7.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-f70a3c4cc7

Comment 11 Fedora Update System 2017-03-24 14:52:56 UTC
python-pygments-2.2.0-7.fc26 has been pushed to the Fedora 26 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-f70a3c4cc7

Comment 12 Fedora Update System 2017-03-24 20:24:10 UTC
python-pygments-2.2.0-7.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-3ceb94d98d

Comment 13 Fedora Update System 2017-03-30 01:20:50 UTC
python-pygments-2.2.0-7.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2017-04-01 17:30:32 UTC
python-pygments-2.2.0-7.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.