Title: mplstyle files: seach in ~/.local/share/matplotlib/ · Issue #17278 · matplotlib/matplotlib · GitHub
Open Graph Title: mplstyle files: seach in ~/.local/share/matplotlib/ · Issue #17278 · matplotlib/matplotlib
X Title: mplstyle files: seach in ~/.local/share/matplotlib/ · Issue #17278 · matplotlib/matplotlib
Description: I would like to write a Python package that also installs an mpl style file. To do that, I can use the data_files attribute of setuptools. This allows me to install files anywhere in the installation directory, which, for pip on Linux, d...
Open Graph Description: I would like to write a Python package that also installs an mpl style file. To do that, I can use the data_files attribute of setuptools. This allows me to install files anywhere in the installati...
X Description: I would like to write a Python package that also installs an mpl style file. To do that, I can use the data_files attribute of setuptools. This allows me to install files anywhere in the installati...
Opengraph URL: https://github.com/matplotlib/matplotlib/issues/17278
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mplstyle files: seach in ~/.local/share/matplotlib/","articleBody":"I would like to write a Python package that also installs an mpl style file. To do that, I can use the `data_files` attribute of `setuptools`. This allows me to install files anywhere in the installation directory, which, for pip on Linux, defaults to `~/.local`. Unfortunately, [mpl will search for mplstyle files only in `~/.config`.](https://matplotlib.org/tutorials/introductory/customizing.html#defining-your-own-style) This means that, for my package, I have to pull a weird stunt:\r\n\r\n 1. Install the file in `~/.local` with the rest of the package\r\n 2. Upon \"start-up\" of the package (`import` or some function call), check if the file is already in `mpl.get_configdir()`, has the same content (for updates), and if not, copy it there. Possibly create the directory.\r\n\r\nThis feels a bit off.\r\n\r\nI'd hence suggest that mpl also searches for mplstyle file in, e.g., `~/.local/share/matplotlib/`. This would also better fit its nature, given that the file is not meant to be edited by the user.","author":{"url":"https://github.com/nschloe","@type":"Person","name":"nschloe"},"datePublished":"2020-04-30T15:59:07.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/17278/matplotlib/issues/17278"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:53c5bb24-1115-4e85-d3cd-a72a6ca8a8dd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B630:133662:4B7D51:662BCB:6A527921 |
| html-safe-nonce | ce05b208b235d841292a3fa87fdf8ab9e744ec3c0f27e8a5f237e248dc3ba6b4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjMwOjEzMzY2Mjo0QjdENTE6NjYyQkNCOjZBNTI3OTIxIiwidmlzaXRvcl9pZCI6IjU4ODM3MzMwMTE0OTIwMjcyMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | addf4eed19e26c404e21b32f69c8d6e71755cecfb2db6800c741603c453d3e77 |
| hovercard-subject-tag | issue:610184247 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/matplotlib/matplotlib/17278/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7b9cd148173330e7668fa19f77db07dc156d7b85f13f7669638b2f0b3b8eae51/matplotlib/matplotlib/issues/17278 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7b9cd148173330e7668fa19f77db07dc156d7b85f13f7669638b2f0b3b8eae51/matplotlib/matplotlib/issues/17278 |
| og:image:alt | I would like to write a Python package that also installs an mpl style file. To do that, I can use the data_files attribute of setuptools. This allows me to install files anywhere in the installati... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nschloe |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| turbo-cache-control | no-preview |
| go-import | github.com/matplotlib/matplotlib git https://github.com/matplotlib/matplotlib.git |
| octolytics-dimension-user_id | 215947 |
| octolytics-dimension-user_login | matplotlib |
| octolytics-dimension-repository_id | 1385122 |
| octolytics-dimension-repository_nwo | matplotlib/matplotlib |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1385122 |
| octolytics-dimension-repository_network_root_nwo | matplotlib/matplotlib |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 07a982c1d40157c619b364352b704c3ce66bb332 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width