#152 Recommend tkinter if tk is installed
Merged 3 months ago by churchyard. Opened 3 months ago by churchyard.
rpms/ churchyard/python3 recommend-tkinter  into  master

file modified
+9 -1

@@ -17,7 +17,7 @@ 

  #global prerel ...

  %global upstream_version %{general_version}%{?prerel}

  Version: %{general_version}%{?prerel:~%{prerel}}

- Release: 1%{?dist}

+ Release: 2%{?dist}

  License: Python

  

  

@@ -407,6 +407,11 @@ 

  # See https://bugzilla.redhat.com/show_bug.cgi?id=1547131

  Recommends: %{name}%{?_isa} = %{version}-%{release}

  

+ # tkinter is part of the standard library,

+ # but it is torn out to save an unwanted dependency on tk and X11.

+ # we recommend it when tk is already installed (for better UX)

+ Recommends: (%{name}-tkinter%{?_isa} = %{version}-%{release} if tk%{?_isa})

+ 

  # https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package

  # In Fedora 31, several "unversioned" files like /usr/bin/pydoc and all the

  # "unversioned" provides were moved from python2 to python3.

@@ -1555,6 +1560,9 @@ 

  # ======================================================

  

  %changelog

+ * Thu Nov 28 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0-2

+ - Recommend python3-tkinter when tk is installed

+ 

  * Mon Oct 14 2019 Miro Hrončok <mhroncok@redhat.com> - 3.8.0-1

  - Update to Python 3.8.0 final

  

I got this idea when Fedora users, participants of a git workshop, haven't got tkinter installed and I thought they would have, since they already had gitk.

What do you think?

This needs a proper changelog entry, but I will add it before this is merged (if at all), to avoid conflicts with other open PRs.

Metadata Update from @churchyard:
- Pull-request tagged with: changelog needed, feature, review needed

3 months ago

AFAIK by adding a 'Recommends' tag the dependency will always get pulled unless --setopt=install_weak_deps=False is specified. I would say that while that is a good feature to have, by having a weak dependency being pulled automatically without a proper explanation (aka the UX from the dnf side) is not something desirable.

Thus I wouldn't do that. Maybe it would be better to revamp the docs on Fedora developer portal to explicitly mention tkinter.

+1 from me. tkinter is a part of Python, IMO it should be pulled in automatically if we know the user has GUI.

AFAIK by adding a 'Recommends' tag the dependency will always get pulled unless...

Unless for example in the build system. In an ideal world, this would have been a hard requirement, but considering the size increase, I went with Recommends, giving a way to opt-out.
Note that the dependency is conditionalized on tk and hence it does not brings further packages in.

I agree with the Recommends.

rebased onto d575501a0f76140acb98c05707387cc339ba7939

3 months ago

rebased onto 9cfdec1

3 months ago

After discussing this a bit, since tk is not installed by default, I would be in favor of that change.

I agree with this. Not once I was confused why there is no tkinter on my desktop when I was helping with some Python workshops.
As it seems like a pretty common scenario to me, this has a +1 from me.

I agree too with the Recommends.

Metadata Update from @churchyard:
- Pull-request untagged with: review needed
- Pull-request tagged with: WIP
- Request assigned

3 months ago

rebased onto 25c078c

3 months ago

Metadata Update from @churchyard:
- Pull-request untagged with: WIP, changelog needed
- Pull-request tagged with: review needed
- Request assignee reset

3 months ago

Metadata Update from @churchyard:
- Pull-request untagged with: review needed

3 months ago

Pull-Request has been merged by churchyard

3 months ago