Bug 1391124

Summary: python-nbconvert: python2-nbconvert and python3-nbconvert requires both Python 2 and Python 3
Product: [Fedora] Fedora Reporter: Dominika Krejčí <dkrejci>
Component: python-nbconvertAssignee: Mukundan Ragavan <nonamedotc>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: nonamedotc
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 01:34:13 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:
Bug Depends On:    
Bug Blocks: 1285816    

Description Dominika Krejčí 2016-11-02 15:35:23 UTC
The python2-nbconvert RPM requires Python 3.
The python3-nbconvert RPM requires Python 2.

Except in very special circumstances, there is no need for one package
to drag in both Python stacks. Usually, this is a packaging error: for
example, a stray "/usr/bin/python" shebang in a Python 3 package can
introduce a Python 2 dependency.

Please split your package, or remove the stray dependencies.
There is a section on shebangs in the Python RPM Porting Guide [0]
which covers this issue.

It's ok to do this in Rawhide only, however, it would be greatly
appreciated if you could push it to Fedora 25 as well.


If anything is unclear, or if you need any kind of assistance, you can
ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy
to help investigating or fixing this issue!


[0] http://python-rpm-porting.readthedocs.io/en/latest/application-modules.html#are-shebangs-dragging-you-down-to-python-2

Comment 1 Mukundan Ragavan 2016-11-03 01:54:31 UTC
$ grep -rE '^#!/usr/bin/(python|env python)'
docs/autogen_config.py:#!/usr/bin/env python
docs/source/conf.py:#!/usr/bin/env python3
docs/src/ipykernel/docs/conf.py:#!/usr/bin/env python3
docs/src/ipykernel/examples/embedding/ipkernel_qtapp.py:#!/usr/bin/env python
docs/src/ipykernel/examples/embedding/ipkernel_wxapp.py:#!/usr/bin/env python
docs/src/ipykernel/setup.py:#!/usr/bin/env python
nbconvert/nbconvertapp.py:#!/usr/bin/env python
scripts/jupyter-nbconvert:#!/usr/bin/env python
setup.py:#!/usr/bin/env python



I thought fixing this might fix the issue. But, that does not seem to fix it.

$ rpm -qp --requires /var/lib/mock/fedora-rawhide-x86_64/result/python2-nbconvert-4.2.0-5.fc26.noarch.rpm 
/usr/bin/python3
python(abi) = 2.7
python-entrypoints
python-jinja2
python-jupyter_core
python-nbformat
python-pygments
python-setuptools
python-traitlets
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1


I have to dig further ... If you can point something that I have missed, please do.

Comment 2 Mukundan Ragavan 2016-11-03 02:07:12 UTC
Never mind. Found the issue. I will build it soon.

Comment 3 Mukundan Ragavan 2016-11-04 01:34:13 UTC
This should be fixed in the latest build on both rawhide and F25.



$ rpm -qp --requires python2-nbconvert-4.2.0-5.fc26.noarch.rpm
/usr/bin/python2
python(abi) = 2.7
python-entrypoints
python-jinja2
python-jupyter_core
python-nbformat
python-pygments
python-setuptools
python-traitlets
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PartialHardlinkSets) <= 4.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1



$ rpm -qp --requires python3-nbconvert-4.2.0-5.fc26.noarch.rpm
/usr/bin/python3
python(abi) = 3.5
python3-entrypoints
python3-jinja2
python3-jupyter_core
python3-nbformat
python3-pygments
python3-setuptools
python3-traitlets
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1



Please reopen the bug if that is not the case.