[Matplotlib-devel] [PATCH] Use XDG config path on FreeBSD

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Matplotlib-devel] [PATCH] Use XDG config path on FreeBSD

aufc
Hello Matplotlib-Devel,

I would like to submit a patch that enables the use of XDG config
directory on FreeBSD, which makes sense for regular users.

The patch is trivial.

Cheers,
Adam



From 9a993f4728762169034a949e3352f279b18a86e6 Mon Sep 17 00:00:00 2001
From: Adam <[hidden email]>
Date: Sun, 19 Feb 2017 10:33:01 +0100
Subject: [PATCH] Use XDG config path on FreeBSD

---
 doc/users/customizing.rst  | 4 ++--
 lib/matplotlib/__init__.py | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/users/customizing.rst b/doc/users/customizing.rst
index 4e2c0c9b8..ccfb6c222 100644
--- a/doc/users/customizing.rst
+++ b/doc/users/customizing.rst
@@ -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`.
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
index 86631ab05..51d190a42 100644
--- a/lib/matplotlib/__init__.py
+++ b/lib/matplotlib/__init__.py
@@ -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')
--
2.11.1


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] Use XDG config path on FreeBSD

Ryan May-3
Adam,

Thanks for the patch. Would it be possible for you to submit this as a Pull Request on GitHub:


?

Thanks,

Ryan

On Sun, Feb 19, 2017 at 11:08 AM, <[hidden email]> wrote:
Hello Matplotlib-Devel,

I would like to submit a patch that enables the use of XDG config
directory on FreeBSD, which makes sense for regular users.

The patch is trivial.

Cheers,
Adam



_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel




--
Ryan May


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] Use XDG config path on FreeBSD

aufc
2017-02-19 11:55 -0700, Ryan May <[hidden email]>:

> Thanks for the patch. Would it be possible for you to submit this as a Pull
> Request on GitHub:

Hi Ryan,

I would prefer not to do it, because I would have to configure GitHub
account for that and I see no benefit to do that ATM.  (Considering the
triviality of the patch.)

I decided to go the "patch over email" way, because it is documented in
the Dev Guide [1] and it's simpler and easier for me than PR.

It's also easy and simple for a commiter to apply the patch with:

git am name-of-the.patch


Please tell me if there are any problems with the pathc.

Cheers,
Adam


[1] http://matplotlib.org/devel/gitwash/patching.html

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] Use XDG config path on FreeBSD

Ryan May-3
Adam,

It's fine--PR is just easier for devs because it doesn't require anything except the web interface. Also, all additions to Matplotlib have to go through a PR at some point.

Adrian took care of opening the PR, and it's already merged to the master branch: https://github.com/matplotlib/matplotlib/pull/8103

Thanks for the patch!

Ryan

On Sun, Feb 19, 2017 at 12:44 PM, <[hidden email]> wrote:
2017-02-19 11:55 -0700, Ryan May <[hidden email]>:

> Thanks for the patch. Would it be possible for you to submit this as a Pull
> Request on GitHub:

Hi Ryan,

I would prefer not to do it, because I would have to configure GitHub
account for that and I see no benefit to do that ATM.  (Considering the
triviality of the patch.)

I decided to go the "patch over email" way, because it is documented in
the Dev Guide [1] and it's simpler and easier for me than PR.

It's also easy and simple for a commiter to apply the patch with:

git am name-of-the.patch


Please tell me if there are any problems with the pathc.

Cheers,
Adam


[1] http://matplotlib.org/devel/gitwash/patching.html

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel



--
Ryan May


_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] Use XDG config path on FreeBSD

aufc
2017-02-20 12:35 -0700, Ryan May <[hidden email]>:

> It's fine--PR is just easier for devs because it doesn't require anything
> except the web interface. Also, all additions to Matplotlib have to go
> through a PR at some point.

OK, I'll keep it in mind.


> Adrian took care of opening the PR, and it's already merged to the master
> branch: https://github.com/matplotlib/matplotlib/pull/8103

Great, thank you for taking care of that.

Adam

_______________________________________________
Matplotlib-devel mailing list
[hidden email]
https://mail.python.org/mailman/listinfo/matplotlib-devel
Loading...