[python-basemap] Add patch fixing the location of basemap_datadir

Pierre-YvesChibon pingou at fedoraproject.org
Thu Jan 15 10:55:27 UTC 2015


commit 6819dfc99795b1fc338d8b86f49f9dfbb9496dab
Author: Pierre-Yves Chibon <pingou at pingoured.fr>
Date:   Thu Jan 15 11:55:35 2015 +0100

    Add patch fixing the location of basemap_datadir

 0001-Fix-the-location-of-basemap_datadir.patch |   25 ++++++++++++++++++++++++
 python-basemap.spec                            |    5 +++-
 2 files changed, 29 insertions(+), 1 deletions(-)
---
diff --git a/0001-Fix-the-location-of-basemap_datadir.patch b/0001-Fix-the-location-of-basemap_datadir.patch
new file mode 100644
index 0000000..b234260
--- /dev/null
+++ b/0001-Fix-the-location-of-basemap_datadir.patch
@@ -0,0 +1,25 @@
+From 054a785ae8aee515a46f670da41b5e0a2f226f12 Mon Sep 17 00:00:00 2001
+From: Pierre-Yves Chibon <pingou at pingoured.fr>
+Date: Thu, 15 Jan 2015 11:53:37 +0100
+Subject: [PATCH] Fix the location of basemap_datadir
+
+---
+ lib/mpl_toolkits/basemap/__init__.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/mpl_toolkits/basemap/__init__.py b/lib/mpl_toolkits/basemap/__init__.py
+index bd52063..3e724c2 100644
+--- a/lib/mpl_toolkits/basemap/__init__.py
++++ b/lib/mpl_toolkits/basemap/__init__.py
+@@ -45,7 +45,7 @@ if 'BASEMAPDATA' in os.environ:
+     if not os.path.isdir(basemap_datadir):
+         raise RuntimeError('Path in environment BASEMAPDATA not a directory')
+ else:
+-    basemap_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
++    basemap_datadir = "/usr/share/basemap"
+ 
+ __version__ = '1.0.7'
+ 
+-- 
+2.1.0
+
diff --git a/python-basemap.spec b/python-basemap.spec
index e3e4bbd..622be44 100644
--- a/python-basemap.spec
+++ b/python-basemap.spec
@@ -18,6 +18,7 @@ Source0:        http://downloads.sourceforge.net/matplotlib/basemap-%{version}.t
 #Patch0:         python-basemap-0.99-setup.cfg.patch
 #Patch1:         python-basemap-0.99-setup.patch
 Patch2:         python-basemap-1.0.7-datadir.patch
+Patch3:         0001-Fix-the-location-of-basemap_datadir.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  python-devel, proj-devel, shapelib-devel, numpy-f2py, geos-devel 
@@ -56,6 +57,7 @@ projections (with continental and political boundaries).
 #%patch0 -p0
 #%patch1 -p0
 %patch2 -p1 -b .
+%patch3 -p1 -b .
 #Remove the bundled libraries
 #mv src/_pyproj.c src/basemap_pycompat.h .
 #rm -rf src pyshapelib/shapelib
@@ -129,7 +131,8 @@ rm -rf $RPM_BUILD_ROOT
 %endif
 
 %changelog
-* Wed Jan 14 2015 Pierre-Yves Chibon <pingou at pingoured.fr> - 1.0.7-6
+* Thu Jan 15 2015 Pierre-Yves Chibon <pingou at pingoured.fr> - 1.0.7-6
+- Add a patch fixing the location of basemap_datadir
 - Replace the sed command that did not work by a patch that does work, fixes
   RHBZ#1177052
 


More information about the scm-commits mailing list