Skip to content

Commit

Permalink
make simplejson optional, except on python < 2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
graphaelli committed Jun 15, 2015
1 parent 08011ea commit faccbc0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
5 changes: 4 additions & 1 deletion pydruid/utils/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import simplejson as json
try:
import simplejson as json
except ImportError:
import json


class Filter:
Expand Down
5 changes: 4 additions & 1 deletion pydruid/utils/having.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
import simplejson as json
try:
import simplejson as json
except ImportError:
import json


class Having:
Expand Down
14 changes: 10 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import sys

from setuptools import setup


install_requires = ["six >= 1.9.0"]

# only require simplejson on python < 2.6
if sys.version_info < (2, 6):
install_requires.append("simplejson >= 3.3.0")

setup(
name='pydruid',
version='0.2.0',
Expand All @@ -10,8 +19,5 @@
license='LICENSE',
description='A Python connector for Druid.',
long_description='See https://github.com/metamx/pydruid for more information.',
install_requires=[
"simplejson >= 3.3.0",
"six >= 1.9.0",
],
install_requires=install_requires,
)

0 comments on commit faccbc0

Please sign in to comment.