Commit bc8cfec1 authored by Sandro Tosi's avatar Sandro Tosi Committed by SVN-Git Migration

Use the datafile in the python-mpltoolkits.basemap-data package,

 if BASEMAPDATA is not set
Patch-Name: use_share_datafiles
parent 81e04b16
......@@ -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/data'
__version__ = '1.0.7'
......
......@@ -235,10 +235,14 @@ pj_ellps={
"sphere": {'a':6370997.0,'b':6370997.0,'description':"Normal Sphere"},
}
pyproj_datadir = os.sep.join([os.path.dirname(__file__), 'data'])
if not os.path.isdir(pyproj_datadir):
msg="proj data directory not found. Expecting it at: %s"%pyproj_datadir
raise IOError(msg)
# check to see if environment variable BASEMAPDATA set to a directory,
# and if so look for the data there.
if 'BASEMAPDATA' in os.environ:
pyproj_datadir = os.environ['BASEMAPDATA']
if not os.path.isdir(pyproj_datadir):
raise RuntimeError('Path in environment BASEMAPDATA not a directory')
else:
pyproj_datadir = '/usr/share/basemap/data'
set_datapath(pyproj_datadir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment