setup.py: Recommend installation command for pkgs#6575
setup.py: Recommend installation command for pkgs#6575tacaswell merged 1 commit intomatplotlib:masterfrom AbdealiLoKo:ajk/setup
Conversation
|
This is still a work in progress, I haven't tested it to my satisfaction - but would love some feedback on the method used as I've never contributed to matplotlib before. |
| pkg_name = self.pkg_names.get(manager, None) | ||
| if pkg_name: | ||
| try: | ||
| _ = check_output(["which", manager], |
There was a problem hiding this comment.
There is a shutil.which, but unfortunately, it's 3.3+. It's probably not worth it to conditionally call it, but can you add a comment about switching to it when we drop 2.7?
|
Bump - reminder for review of this PR |
setupext.py
Outdated
| def install_help_msg(self): | ||
| """ | ||
| The help message to show if the package is not installed. The help | ||
| message shown depends on whether some class variables are present. |
There was a problem hiding this comment.
Can you add a note to this docstring explaining how to add the feature to sub-classes?
If a package is not found, provide a better error message
that also explains how to install the package or gives the
user a link explaining what to do to install the package.
The supported methods are:
- Provide a link for windows
- Provide a command using a package manager for the OS
(For example: apt-get for Ubuntu/Debian, dnf and yum for
Fedora/CentOS/RHEL, brew and port for OSX)
|
👍 I'll merge this as soon as CI passes again (just to be paranoid). |
|
@tacaswell Do you recommend we use |
|
It will only be seen if things go wrong anyway 😈 . Given the amount of sound and fury in the upstream bug, I am inclined to let this shake it self out a bit more before jumping on a solution. On the other hand, better to deal with it now than later (when we have forgotten). |
|
Maybe we could merge the PR but keep the issue open or create a new tracking issue to keep track of it ? |
If a package is not found, provide a better error message
that also explains how to install the package or gives the
user a link explaining what to do to install the package.
The supported methods are:
(For example: apt-get for Ubuntu/Debian, dnf and yum for
Fedora/CentOS/RHEL, brew and port for OSX)
Fixes #6546