Bug 1330005 - python2-cpuinfo requires both Python 2 and Python 3
Summary: python2-cpuinfo requires both Python 2 and Python 3
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-cpuinfo
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Parag Nemade
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-25 09:26 UTC by Petr Viktorin (pviktori)
Modified: 2016-05-07 11:54 UTC (History)
1 user (show)

Fixed In Version: python-cpuinfo-0.2.3-2.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-07 11:54:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Petr Viktorin (pviktori) 2016-04-25 09:26:37 UTC
python2-cpuinfo-0.2.3-1 (in Rawhide) requires both Python 2 and Python 3.
This is because /usr/bin/cpuinfo is built with %py3_install, so it has
a python3 shebang.

What you meant to do can be done with an %install section like this:

    %py3_install  # creates _bindir/cpuinfo with a python3 shebang
    cp -p %{buildroot}/%{_bindir}/cpuinfo %{buildroot}/%{_bindir}/cpuinfo-3
    %py2_install  # creates _bindir/cpuinfo with a python2 shebang


However, if /usr/bin/cpuinfo does not interact with Python code, you
can package just the Python 3 version, with an %install section as simply:

    %py2_install
    %py3_install

and only keeping %{_bindir}/cpuinfo in the Python 3 subpackage.


If anything is unclear, or if you need any kind of assistance, you can
ask on IRC (#fedora-python on Freenode), or reply here.
More info is also in the Python packaging guidelines [0] and the
RPM Porting Guide [1].

[0] https://fedoraproject.org/wiki/Packaging:Python
[1] http://python-rpm-porting.readthedocs.org/en/latest/index.html

Comment 1 Parag Nemade 2016-04-25 12:34:14 UTC
Thank you very much for catching this. I am surprised that someone is watching such changes and trying hard to have correct python versioned subpackages and their dependencies.

Thanks for your this work. I have committed the required changes now.

Comment 2 Fedora Update System 2016-04-25 12:57:19 UTC
python-cpuinfo-0.2.3-2.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-ff96b284d2

Comment 3 Fedora Update System 2016-04-25 17:50:12 UTC
python-cpuinfo-0.2.3-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-2016-ff96b284d2

Comment 4 Fedora Update System 2016-05-07 11:54:10 UTC
python-cpuinfo-0.2.3-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.