Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use XDG config path on FreeBSD #8103

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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/users/customizing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ locations, in the following order:

3. It next looks in a user-specific place, depending on your platform:

- On Linux, it looks in :file:`.config/matplotlib/matplotlibrc` (or
`$XDG_CONFIG_HOME/matplotlib/matplotlibrc`) if you've customized
- On Linux and FreeBSD, it looks in :file:`.config/matplotlib/matplotlibrc`
(or `$XDG_CONFIG_HOME/matplotlib/matplotlibrc`) if you've customized
your environment.

- On other platforms, it looks in :file:`.matplotlib/matplotlibrc`.
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,7 +645,7 @@ def _get_config_or_cache_dir(xdg_base):
h = get_home()
if h is not None:
p = os.path.join(h, '.matplotlib')
if sys.platform.startswith('linux'):
if sys.platform.startswith('linux') or sys.platform.startswith('freebsd'):
p = None
if xdg_base is not None:
p = os.path.join(xdg_base, 'matplotlib')
Expand Down