Bug 1553852 - texlive-base: texlive-pythontex requires both Python 2 and Python 3
Summary: texlive-base: texlive-pythontex requires both Python 2 and Python 3
Status: ASSIGNED
Alias: None
Product: Fedora
Classification: Fedora
Component: texlive-base
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: PYTHON3 PYTHON3-PYTHON2
TreeView+ depends on / blocked
 
Reported: 2018-03-09 17:27 UTC by Iryna Shcherbina
Modified: 2018-08-14 11:07 UTC (History)
1 user (show)

(edit)
Clone Of:
(edit)
Last Closed:


Attachments (Terms of Use)

Description Iryna Shcherbina 2018-03-09 17:27:03 UTC
The texlive-pythontex RPM requires both Python 2 and Python 3:

$ dnf repoquery --repo=rawhide --requires texlive-pythontex | grep python
/usr/bin/python2
/usr/bin/python3

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 28 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 Tom "spot" Callaway 2018-03-11 19:24:40 UTC
I think this might be one of the "very special circumstances".

pythontex is already split out into python2 and python3 versions, with the main script doing python version detection and launching the appropriate version:

/usr/share/texlive/texmf-dist/scripts/pythontex/depythontex.py
/usr/share/texlive/texmf-dist/scripts/pythontex/depythontex2.py
/usr/share/texlive/texmf-dist/scripts/pythontex/depythontex3.py

depythontex.py:

import sys
if sys.version_info[0] == 2:
    import depythontex2 as depythontex
elif sys.version_info[0] == 3:
    import depythontex3 as depythontex

Now, I _could_ split out the python3 files into their own subpackage, but upstream assumes they will both be present, so the net result will be the same.

Let me know how you want me to handle this.

Comment 2 Iryna Shcherbina 2018-03-12 10:54:54 UTC
Thanks for the explanation.
If that is how upstream intends it, then please keep the package as it is, we will whitelist it in our sanity checks.

Comment 3 Jan Kurik 2018-08-14 11:07:42 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.


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