Skip to content

Commit

Permalink
Remove six dep (#43)
Browse files Browse the repository at this point in the history
* remove six dep

fix syntax errors

* fix import order
  • Loading branch information
JMSwag authored Mar 1, 2020
1 parent 02e44f6 commit f09b799
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 6 deletions.
7 changes: 6 additions & 1 deletion examples/earthquakes.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
"""Get the current USGS earthquake feed and add it to a DecoratedMap."""
from __future__ import print_function
from motionless import LatLonMarker, DecoratedMap
from six.moves.urllib import request

try:
from urllib import request
except ImportError:
import urllib as request

try:
import geojson
except ImportError:
Expand Down
8 changes: 6 additions & 2 deletions motionless.py → motionless/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@
import hmac
import hashlib
import re
from six.moves.urllib.parse import quote, urlparse
from gpolyencode import GPolyEncoder
try:
from urllib import quote
from urlparse import urlparse
except ImportError:
from urllib.parse import quote, urlparse
from .gpolyencode import GPolyEncoder

"""
motionless is a library that takes the pain out of generating Google Static Map URLs.
Expand Down
5 changes: 4 additions & 1 deletion gpolyencode.py → motionless/gpolyencode.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
POSSIBILITY OF SUCH DAMAGE.
"""
import math
from six import StringIO
try:
from StringIO import StringIO
except ImportError:
from io import StringIO


class GPolyEncoder(object):
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
METADATA = dict(
name = "motionless",
version = __version__,
py_modules = ['setup', 'motionless', 'gpolyencode'],
packages = ['motionless'],
author = 'Ryan Cox',
author_email = 'ryan.a.cox@gmail.com',
description = 'An easy way to generate Google Static Map URLs with Python.',
Expand All @@ -19,7 +19,7 @@

# Setuptools version
SETUPTOOLS_METADATA = dict(
install_requires = ['setuptools', 'six'],
install_requires = ['setuptools'],
include_package_data = True,
classifiers = [
'Development Status :: 4 - Beta',
Expand Down

0 comments on commit f09b799

Please sign in to comment.