8000 Simplify _get_xdg_cache_dir in setupext. by anntzer · Pull Request #10247 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 1 commit into from
Jan 16, 2018
Merged

Conversation

anntzer
Copy link
Contributor
@anntzer anntzer commented Jan 14, 2018
  1. we don't support google app engine anymore (Don't pretend to support Google App Engine. #8939).
  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).

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

@anntzer anntzer added the Build label Jan 14, 2018
setupext.py Outdated
return path
cache_dir = os.environ.get('XDG_CACHE_HOME')
if not cache_dir:
cache_dir = os.path.expanduser('~/.cache/matplotlib')
Copy link
Member

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.

Copy link
Contributor Author

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')
Copy link
Member

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?

Copy link
Contributor Author

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
Copy link
Member

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).
@QuLogic QuLogic added this to the v2.2 milestone Jan 16, 2018
@QuLogic QuLogic merged commit 7ee6499 into matplotlib:master Jan 16, 2018
@anntzer anntzer deleted the xdgcache branch January 16, 2018 01:42
@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
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.

3 participants
0