Merge pull request #22 from graingert/excise-simplejson
Don't depend on simplejson
diff --git a/.travis.yml b/.travis.yml
index a18826e..a1ea020 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,11 +1,12 @@
language: python
python:
- - "2.6"
- "2.7"
- "3.3"
- "3.4"
- "pypy"
-# dependencies
-install: pip install simplejson --use-mirrors
-# command to run tests
+matrix:
+ include:
+ - python: "2.6"
+ install: pip install simplejson
script: "cd test; make"
+sudo: false
diff --git a/README.rst b/README.rst
index 80129cb..77de20f 100644
--- a/README.rst
+++ b/README.rst
@@ -36,7 +36,7 @@
uritemplate works with Python 2.5+.
-.. note:: You need to install `simplejson`_ module for Python 2.5.
+.. note:: You need to install `simplejson`_ module to run the tests on Python 2.5.
.. _simplejson: https://pypi.python.org/pypi/simplejson/
diff --git a/setup.py b/setup.py
index 9b71aae..faf6460 100755
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,6 @@
packages = ['uritemplate'],
provides = ['uritemplate'],
long_description=open("README.rst").read(),
- install_requires = ['simplejson >= 2.5.0'],
classifiers = [
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
diff --git a/test/uritemplate_test.py b/test/uritemplate_test.py
index f691cd9..b42c80b 100644
--- a/test/uritemplate_test.py
+++ b/test/uritemplate_test.py
@@ -1,11 +1,14 @@
import uritemplate
-import simplejson
+try:
+ import json
+except ImportError:
+ import simplejson as json
import sys
filename = sys.argv[1]
print("Running", filename)
f = open(filename)
-testdata = simplejson.load(f)
+testdata = json.load(f)
try:
desired_level = int(sys.argv[2])