Bug 1750911 - python36-tabulate (mistakenly) requires python3.4
Summary: python36-tabulate (mistakenly) requires python3.4
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: python-tabulate
Version: epel7
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Raphael Groner
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-10 17:59 UTC by Ling Li
Modified: 2019-10-01 03:20 UTC (History)
9 users (show)

Fixed In Version: python-tabulate-0.8.3-8.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-01 03:20:47 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ling Li 2019-09-10 17:59:04 UTC
Description of problem:

python36-tabulate-0.8.3-7.el7.noarch.rpm has a dependency on python3.4, which is probably unwanted.

Version-Release number of selected component (if applicable):

0.8.3-7.el7.noarch.rpm

How reproducible:

rpm -qp --requires python36-tabulate-0.8.3-7.el7.noarch.rpm

Actual results:

/usr/bin/python3.4
python(abi) = 3.6
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1

Expected results:

Without /usr/bin/python3.4

Additional info:

I looked through the source code and couldn't find the dependency.

Comment 1 Raphael Groner 2019-09-10 18:16:07 UTC
Thanks for testing. TBH I don't know either why the wrong python version gets associated.
Will investigate, maybe the bug is deeper inside python or rpmbuild.

Comment 2 Raphael Groner 2019-09-13 17:34:28 UTC
Reproducible with a scratch build but no idea what happens.

Provides: python3-tabulate = 0.8.3-7.el7 python36-tabulate = 0.8.3-7.el7
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /usr/bin/python3.4 python(abi) = 3.6
...
Provides: python34-tabulate = 0.8.3-7.el7
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /usr/bin/python3.4 python(abi) = 3.4

Maybe a real bug inside the build chain? Reassigning to get help from the other maintainers.

Comment 3 Miro Hrončok 2019-09-13 20:19:56 UTC
This is a packaging error.

	
%install
%{?with_python2: %py2_install}
%py3_install
%{?python3_other_pkgversion: %py3_other_install}


This does in the follwoing order:

 - install /usr/bin/tabulate with python2 shebang
 - install /usr/bin/tabulate with python3.6 shebang
 - install /usr/bin/tabulate with python3.4 shebang

And this:


%files -n python%{python3_pkgversion}-%{modname}
...
%{_bindir}/%{modname}
...
 
%if 0%{?python3_other_pkgversion}
...
%{_bindir}/%{modname}
...
%endif

Puts /usr/bin/tabulate with python3.4 shebang to both packages.

Comment 4 Raphael Groner 2019-09-14 06:42:38 UTC
Miro, thanks for the analysis and explanation.

> Puts /usr/bin/tabulate with python3.4 shebang to both packages.

We'd have to use a suffix then for the installed binaries?
Is there any default version?

https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_multiple_python_runtimes
https://fedoraproject.org/wiki/PackagingDrafts:Python3EPEL#Modules > scripts/entry-points
https://fedoraproject.org/wiki/PackagingDrafts:Python3EPEL#All_Packages

Comment 5 Miro Hrončok 2019-09-14 08:47:33 UTC
What does the executable actually do?

Comment 6 Raphael Groner 2019-09-14 09:14:42 UTC
(In reply to Miro Hrončok from comment #5)
> What does the executable actually do?

The binary's a command line tool: "tabulate - Pretty-print tabulate data."

No idea if there are more|less options as mentioned in this quickly found manpage:
https://bitbucket.org/astanin/python-tabulate/src/a4c22260a8b01c9cafd57de9465ba45394a4c027/tabulate.py#lines-1456
https://dokk.org/manpages/tabulate.1

Comment 7 Miro Hrončok 2019-09-14 09:30:51 UTC
My educated guess is that the user of the command doesn't nee to care what python version runs it at all. Keep it in python36-tabulate only:



%install
%{?with_python2: %py2_install}
%{?python3_other_pkgversion: %py3_other_install}

# Make sure the executables are owned by py3
rm -f %{buildroot}%{_bindir}/*
%py3_install



And only list %{_bindir}/%{modname} in %files -n python%{python3_pkgversion}-%{modname}

Comment 8 Raphael Groner 2019-09-14 11:24:51 UTC
> Keep it in python36-tabulate only

Agreed.
Reporter, do you agree, too?

Comment 9 Ling Li 2019-09-14 19:39:58 UTC
I only use tabulate as a module, not with command line.  So I agree that only keeping it with python36-tabulate is reasonable.

Comment 10 Raphael Groner 2019-09-15 08:22:00 UTC
OK, a new build and update is on the way.

Well, the branches epel7 and master are now really diverged. Maybe we'd consider to merge?

Comment 11 Fedora Update System 2019-09-15 08:53:23 UTC
FEDORA-EPEL-2019-2a015b2414 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2019-2a015b2414

Comment 12 Fedora Update System 2019-09-16 04:11:48 UTC
python-tabulate-0.8.3-8.el7 has been pushed to the Fedora EPEL 7 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-EPEL-2019-2a015b2414

Comment 13 Fedora Update System 2019-10-01 03:20:47 UTC
python-tabulate-0.8.3-8.el7 has been pushed to the Fedora EPEL 7 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.