Skip to content

Commit 6497e42

Browse files
committed
Merge pull request #234 from micahcochran/ext-pyshp-pyproj
Make pyshp and pyproj external dependencies
2 parents 2d2d73e + 4cacb5b commit 6497e42

File tree

16 files changed

+60
-2092
lines changed

16 files changed

+60
-2092
lines changed

.requirements-2.6.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
unittest2

.travis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ install:
3232
pip install --upgrade setuptools
3333
pip install $NUMPY
3434
pip install $MPL
35+
pip install -r requirements.txt
36+
37+
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install -r .requirements-2.6.txt; fi
38+
3539
- |
3640
cd geos-3.3.3
3741
export GEOS_DIR=$HOME/.local/

Changelog

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
version 1.0.8 (not yet released)
22
--------------------------------
3+
* removes inline pyshp and pyproj code and uses makes these packages required
4+
external dependencies (handling issue 230).
35
* add 'textcolor' kwarg to drawmeridians and drawparallels (issue 145).
46
* don't assume grid is regular when adding cyclic point in addcyclic.
57
New kwargs 'axis' and 'cyclic' added. More than one array

LICENSE_pyshp

Lines changed: 0 additions & 3 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ using matplotlib.
1111

1212
* numpy
1313

14+
* [pyproj](https://github.com/jswhit/pyproj)
15+
16+
* [pyshp](https://github.com/GeospatialPython/pyshp)
17+
1418
* The GEOS (Geometry Engine - Open Source) library (version 3.1.1 or higher).
1519
Source code is included in the geos-3.3.3 directory.
1620

@@ -31,9 +35,6 @@ source code for the GEOS library is
3135
included in the 'geos-3.3.3' directory under the terms given in
3236
LICENSE_geos.
3337

34-
shapefile.py from pyshp.googlecode.com is included under the terms given
35-
in LICENSE_pyshp.
36-
3738
the land-sea mask, coastline, lake, river and political boundary data are extracted
3839
from datasets provided with the [Generic Mapping Tools (GMT)](http://gmt.soest.hawaii.edu)
3940
and are included under the terms given in LICENSE_data.

examples/allskymap.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
from numpy import *
2424
import matplotlib.pyplot as pl
2525
from matplotlib.pyplot import *
26-
from mpl_toolkits.basemap import Basemap, pyproj
27-
from mpl_toolkits.basemap.pyproj import Geod
26+
from mpl_toolkits.basemap import Basemap
27+
import pyproj
28+
from pyproj import Geod
2829

2930
__all__ = ['AllSkyMap']
3031

examples/testwmsimage.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
from a WMS server and display it on a map (using the
44
wmsimage convenience method)
55
"""
6-
from mpl_toolkits.basemap import Basemap, pyproj
6+
from mpl_toolkits.basemap import Basemap
7+
import pyproj
78
from datetime import datetime
89
import numpy as np
910
import matplotlib.pyplot as plt

examples/utmtest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from __future__ import print_function
2-
from mpl_toolkits.basemap import pyproj
2+
import pyproj
33
from mpl_toolkits.basemap import Basemap
44
import matplotlib.pyplot as plt
55
# proj4 definition of UTM zone 17.

lib/mpl_toolkits/basemap/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from matplotlib.patches import Ellipse, Circle, Polygon, FancyArrowPatch
2828
from matplotlib.lines import Line2D
2929
from matplotlib.transforms import Bbox
30-
from . import pyproj
30+
import pyproj
3131
from mpl_toolkits.axes_grid1 import make_axes_locatable
3232
from matplotlib.image import imread
3333
import sys, os, math
@@ -2128,7 +2128,7 @@ def readshapefile(self,shapefile,name,drawbounds=True,zorder=None,
21282128
matplotlib.patches.LineCollection object is appended to the tuple.
21292129
"""
21302130
import shapefile as shp
2131-
from .shapefile import Reader
2131+
from shapefile import Reader
21322132
shp.default_encoding = default_encoding
21332133
if not os.path.exists('%s.shp'%shapefile):
21342134
raise IOError('cannot locate %s.shp'%shapefile)

lib/mpl_toolkits/basemap/proj.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
from . import pyproj
2+
import pyproj
33
import math
44
from matplotlib.cbook import dedent
55

0 commit comments

Comments
 (0)