Skip to content
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

_get_xdg_config_dir(), _get_xdg_cache_dir() - Restored for conformity to the standard. #2692

Closed
wants to merge 2 commits into from

Conversation

michs
Copy link
Contributor

@michs michs commented Dec 21, 2013

These commits result from making matplotlib running on a cluster system where no write access to the home directory exists from compute nodes. With these commits matplotlib can be used in that environment even without setting the environment variables XDG_*. The configuration and cache directory will then be created in the directory for temporary files.

  1. The first commit restores standardconformity in the calculation of the configuration and cache directories. According to the freedesktop standard can the location of directories be specified independent from the existence of a home directory. This was not given in the implementation.

Compare http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables paragraphes 2 and 8.

  1. The second commit restores the possibility to use an old configuration on Linux. That feature was lost in the last commit.

Michael added 2 commits December 21, 2013 23:12
…the functions fulfil the specification of the standard.

The previous change to avoid exceptions if no home directory exists broke the standard. Configuration and cache directories could be specified by environment variables independent from the existence of a home directory because they can be elsewhere.
…t_configdir() restored.

1. If an old config $HOME/.matplotlib exists it should be chosen also on Linux.

2. However, if the old config does not exist and xdg_home is None (can be the case in cluster environments) -> do not try to create directory in the non-existing home directory rather in the temporary directory.
@michs
Copy link
Contributor Author

michs commented Dec 26, 2013

Closing this PR because it will be merged into master via a PR in branch V1.3.x.

@michs michs closed this Dec 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant