-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Simplify _get_xdg_cache_dir in setupext. #10247
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
Conversation
setupext.py
Outdated
return path | ||
cache_dir = os.environ.get('XDG_CACHE_HOME') | ||
if not cache_dir: | ||
cache_dir = os.path.expanduser('~/.cache/matplotlib') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this work Win32? Otherwise looks good to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if path is not None: | ||
path = os.path.join(path, '.cache', 'matplotlib') | ||
return path | ||
cache_dir = os.environ.get('XDG_CACHE_HOME') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this add matplotlib
on the end?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, the previous version did not, but that was arguably a bug... fixed.
setupext.py
Outdated
<http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html>`_. | ||
Return the XDG cache directory. | ||
|
||
See http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https
1. we don't support google app engine anymore. 2. in setupext, the cache dir is only used to cache the freetype tarball, so it's really not a huge deal if a cache dir cannot be located (this case is handled explicitly by the freetype build code).
tarball, so it's really not a huge deal if a cache dir cannot be
located (this case is handled explicitly by the freetype build code).
PR Summary
PR Checklist