Bug 1321456

Summary: RFE: drop hard dependency on the default tk backend
Product: [Fedora] Fedora Reporter: Volker Fröhlich <volker27>
Component: python-matplotlibAssignee: Elliott Sales de Andrade <quantum.analyst>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: cstratak, gwync, jonathan.underwood, jspaleta, paulo.cesar.pereira.de.andrade, python-sig, tomspur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Volker Fröhlich 2016-03-27 11:44:06 UTC
rpm -q --requires python2-matplotlib

...
python2-matplotlib-tk(x86-64) = 1.4.3-11.fc23
...


This essentially drags in tkinter. Rawhide is also affected and I guess all versions in between.

Comment 1 Thomas Spura 2016-04-04 11:02:51 UTC
What solution would you suggest?
Matplotlib depends on one (random) backend and I don't think it makes much difference to depend on another one instead, which then drags in other dependencies.

Comment 2 Dominik 'Rathann' Mierzejewski 2016-06-23 09:27:25 UTC
In theory, we could add virtual provides to all backend subpackagers, e.g.:

Provides: python[23]-matplotlib-backend

and then add a hard dependency on it to the main package:

Requires: python[23]-matplotlib-backend = %{version}-%{release}

We could also favour the tk backend by using

Recommends: python[23]-matplotlib-%{backend_subpackage} = %{version}-%{release}

I'll have to test how well this works in practice.

Comment 3 Thomas Spura 2016-06-23 18:28:59 UTC
The default backend is also written in the default configuration file.
IIRC, it is not possible to pick a random, existing backend because of that.

Or did that change recently?

Comment 4 Dominik 'Rathann' Mierzejewski 2016-06-24 07:18:59 UTC
No, I haven't changed that. I imagine it's possible to make it work like this:

if just one backend is installed, set it in matplotlibrc
else (more than one is installed):
    if tk backend is present, set tk in matplotlibrc
    else pick the last one installed

I'm not sure it's worth the effort, though.

Comment 5 Dominik 'Rathann' Mierzejewski 2016-06-24 07:21:14 UTC
Basically, I meant to say: patches welcome.

Comment 6 Fedora Admin user for bugzilla script actions 2020-07-08 14:54:38 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.