Skip to content

Commit 6544e4c

Browse files
committed
Depend on simplejson for Python <2.6.
1 parent 320ee3c commit 6544e4c

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

setup.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
import codecs
4+
import sys
45

56
try:
67
from setuptools import setup, find_packages
@@ -11,6 +12,13 @@
1112

1213
import github2
1314

15+
16+
install_requires = ['httplib2', ]
17+
# simplejson is included in the standard library since Python 2.6 as json.
18+
if sys.version_info[:2] < (2, 6):
19+
install_requires.append('simplejson >= 2.0.9')
20+
21+
1422
setup(
1523
name='github2',
1624
version=github2.__version__,
@@ -22,9 +30,7 @@
2230
platforms=["any"],
2331
packages=find_packages(exclude=['ez_setup', 'tests']),
2432
scripts=['github2/bin/github_manage_collaborators'],
25-
install_requires=[
26-
"httplib2",
27-
],
33+
install_requires=install_requires,
2834
classifiers=[
2935
"Development Status :: 3 - Alpha",
3036
"Operating System :: OS Independent",

0 commit comments

Comments
 (0)