Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove LaTeX checking in setup.py. #9571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 21, 2018

Conversation

anntzer
Copy link
Contributor

@anntzer anntzer commented Oct 25, 2017

We already have runtime tests for LaTeX and associated dependencies; the
check in setup.py is not used for anything.

PR Summary

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

We already have runtime tests for LaTeX and associated dependencies; the
check in setup.py is not used for anything.
@anntzer anntzer added the Build label Oct 25, 2017
Copy link
Member

@Kojoley Kojoley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the point? From time to time I found this checks helpful.

@anntzer
Copy link
Contributor Author

anntzer commented Oct 27, 2017

These checks are already available at runtime (as matplotlib.checkdep_foo), when the check is arguably more useful (it is not like a build time option where we actually need to build a different version of matplotlib depending on whether tex is available; even with tex not present I can just first install matplotlib and then install tex and everything will work fine).

@tacaswell tacaswell added this to the v2.2 milestone Oct 30, 2017
@tacaswell
Copy link
Member

It is nice to catch the warning when you install rather than when something fails.

@anntzer
Copy link
Contributor Author

anntzer commented Oct 30, 2017

But this only gets executed when installing from source rather than from a wheel or a conda package (which is likely the most common case where the warning would be useful...).

@tacaswell
Copy link
Member

Can we move this to (or do we already have?) a utility function at in the top level namespace like check_latex_installation() -> Dict[packag_name, version or None]?

@anntzer
Copy link
Contributor Author

anntzer commented Oct 30, 2017

You mean these? :-)

In [7]: matplotlib.checkdep_dvipng()
Out[7]: '1.15'

In [8]: matplotlib.checkdep_tex()
/usr/bin/ipython:1: MatplotlibDeprecationWarning: The checkdep_tex function was deprecated in version 2.1.
  #!/usr/bin/python3
Out[8]: '3.14159265'

In [9]: matplotlib.checkdep_ghostscript()
Out[9]: ('gs', '9.22')

(and a few others)

We could unify all these into something like

matplotlib.list_installed_executables()
--->
{"depname": ("dep_executable", "version") or None}

(also including gs and inkscape, so not just latex deps)

@tacaswell
Copy link
Member

Yes, those. We should bundle them up into one summary function?

@anntzer
Copy link
Contributor Author

anntzer commented Oct 30, 2017

That's what I proposed above (but you may have missed the edit :-))

@tacaswell
Copy link
Member

👍

@anntzer anntzer modified the milestones: needs sorting, v3.0 Feb 15, 2018
@anntzer anntzer mentioned this pull request Feb 23, 2018
6 tasks
Copy link
Member

@efiring efiring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to assume that #9639 will go in after minor modification, so I think the present PR should go in now.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me.

@jklymak jklymak merged commit a81fdf5 into matplotlib:master Mar 21, 2018
@anntzer anntzer deleted the remove-latex-entries-in-setup.py branch March 21, 2018 20:48
@anntzer anntzer mentioned this pull request Jan 28, 2019
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants