Skip to content

Commit 708c36f

Browse files
committed
use simplejson for Python 2.5
1 parent 2a5ad35 commit 708c36f

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ python:
77
- "2.6"
88
- "2.5"
99
- "pypy"
10+
install:
11+
- if [ "`python -c 'import sys; print(sys.version_info[0:2])'`" = "(2, 5)" ]; then pip install -r requirements.txt --use-mirrors; fi
1012
script: make test

requirements.txt

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

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@
55

66
PROJ_METADATA = '%s.json' % PROJ_NAME
77

8-
import os, json, imp
8+
import os, imp
9+
try:
10+
import json
11+
except ImportError:
12+
import simplejson as json
13+
914
here = os.path.abspath(os.path.dirname(__file__))
1015
proj_info = json.loads(open(os.path.join(here, PROJ_METADATA)).read())
1116
README = open(os.path.join(here, 'README.rst')).read()

0 commit comments

Comments
 (0)