-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Load style files from third-party packages. #24257
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
importlib_resources>=2.3.0 is now required on Python<3.10 | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
Style files can be imported from third-party packages | ||
----------------------------------------------------- | ||
|
||
Third-party packages can now distribute style files that are globally available | ||
as follows. Assume that a package is importable as ``import mypackage``, with | ||
a ``mypackage/__init__.py`` module. Then a ``mypackage/presentation.mplstyle`` | ||
style sheet can be used as ``plt.style.use("mypackage.presentation")``. | ||
|
||
The implementation does not actually import ``mypackage``, making this process | ||
safe against possible import-time side effects. Subpackages (e.g. | ||
``dotted.package.name``) are also supported. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -334,6 +334,11 @@ def make_release_tree(self, base_dir, files): | |
os.environ.get("CIBUILDWHEEL", "0") != "1" | ||
) else [] | ||
), | ||
extras_require={ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this is not doing what you would expect it to. Python version specific markers can be achieved with
This should be in the main dependencies section, not as an extra. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does actually work, I checked when I had the same thought previously. It is a bit outdated, and what you linked is the more recommended way, but this is valid (if perhaps not fully future-proof, as it is not well documented any more). |
||
':python_version<"3.10"': [ | ||
"importlib-resources>=3.2.0", | ||
], | ||
}, | ||
use_scm_version={ | ||
"version_scheme": "release-branch-semver", | ||
"local_scheme": "node-and-date", | ||
|
Uh oh!
There was an error while loading. Please reload this page.