diff --git a/python-basemap-1.0.7-datadir.patch b/python-basemap-1.0.7-datadir.patch new file mode 100644 index 0000000..b389f6e --- /dev/null +++ b/python-basemap-1.0.7-datadir.patch @@ -0,0 +1,25 @@ +From aa43178c0c5cc3353a5dfad8fa4a80c8b5cfbeba Mon Sep 17 00:00:00 2001 +From: Pierre-Yves Chibon +Date: Wed, 14 Jan 2015 16:34:54 +0100 +Subject: [PATCH] Fix the pyproj_datadir to point to the right location + +--- + lib/mpl_toolkits/basemap/pyproj.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/mpl_toolkits/basemap/pyproj.py b/lib/mpl_toolkits/basemap/pyproj.py +index 097f099..57aa69a 100644 +--- a/lib/mpl_toolkits/basemap/pyproj.py ++++ b/lib/mpl_toolkits/basemap/pyproj.py +@@ -235,7 +235,7 @@ pj_ellps={ + "sphere": {'a':6370997.0,'b':6370997.0,'description':"Normal Sphere"}, + } + +-pyproj_datadir = os.sep.join([os.path.dirname(__file__), 'data']) ++pyproj_datadir = "/usr/share/basemap/" + if not os.path.isdir(pyproj_datadir): + msg="proj data directory not found. Expecting it at: %s"%pyproj_datadir + raise IOError(msg) +-- +2.1.0 + diff --git a/python-basemap.spec b/python-basemap.spec index b4b998e..0239e37 100644 --- a/python-basemap.spec +++ b/python-basemap.spec @@ -17,7 +17,7 @@ Source0: http://downloads.sourceforge.net/matplotlib/basemap-%{version}.t #Source1: http://dl.sf.net/matplotlib/basemap-%{version}-examples.tar.gz #Patch0: python-basemap-0.99-setup.cfg.patch #Patch1: python-basemap-0.99-setup.patch -#Patch2: python-basemap-1.0.6-datadir.patch +Patch2: python-basemap-1.0.7-datadir.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python-devel, proj-devel, shapelib-devel, numpy-f2py, geos-devel @@ -55,7 +55,7 @@ projections (with continental and political boundaries). %setup -q -n basemap-%{version} #%patch0 -p0 #%patch1 -p0 -#%patch2 -p1 +%patch2 -p1 -b . #Remove the bundled libraries #mv src/_pyproj.c src/basemap_pycompat.h . #rm -rf src pyshapelib/shapelib @@ -63,7 +63,6 @@ projections (with continental and political boundaries). #Remove the data files rm -rf lib/mpl_toolkits/basemap/data/ -sed -i -e "s|pyproj_datadir = os.sep.join([os.path.dirname(__file__), 'data'])|pyproj_datadir = '/usr/share/basemap'|" lib/mpl_toolkits/basemap/pyproj.py %if %{with_python3} rm -rf %{py3dir}