Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Include template matplotlibrc in package_data. #11273

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

Conversation

Copy link
Contributor

@anntzer anntzer commented May 18, 2018

This is necessary to make the tests pass for a non-editable install.

Should close #10717 (attn @matthew-brett).

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

This is necessary to make the tests pass for a non-editable install.
@anntzer anntzer added this to the v3.0 milestone May 18, 2018
Copy link
Member

Is this file going to be auto-generated before it gets included? I am not exactly sure how this process works in setuptools.

Copy link
Contributor Author

anntzer commented May 19, 2018

@WeatherGod It's always present in the source tree.

Copy link
Member

WeatherGod commented May 19, 2018 via email

...
On Sat, May 19, 2018 at 4:30 PM, Antony Lee ***@***.***> wrote: @WeatherGod <https://github.com/WeatherGod> It's always present in the source tree. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#11273 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AARy-Cla722p0Z4QgGrsW15aVXg-PqTgks5t0IDvgaJpZM4UFIV3> .

Copy link
Contributor Author

anntzer commented May 19, 2018

Oh sorry, my bad.
But yes, it is generated by setup.py

 with open('lib/matplotlib/mpl-data/matplotlibrc', 'w') as fd:
 fd.write(
 template.safe_substitute(TEMPLATE_BACKEND=default_backend))

and that happens even before setuptools has a chance to look at sys.argv, IOW early enough in the process for things to work.

@WeatherGod WeatherGod merged commit d441ac4 into matplotlib:master May 20, 2018
@anntzer anntzer deleted the matplotlibrctemplate-in-package-data branch May 20, 2018 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@tacaswell tacaswell tacaswell approved these changes

Assignees
No one assigned
Labels
Projects
None yet
Milestone
v3.0.0
Development

Successfully merging this pull request may close these issues.

Failure to find matplotlibrc when testing installed distribution

AltStyle によって変換されたページ (->オリジナル) /