From: Ed Page Date: Fri, 12 Aug 2011 01:30:09 +0000 (-0500) Subject: Making simplejson a fallback for py<2.6 X-Git-Url: http://git.maemo.org/git/?p=gonvert;a=commitdiff_plain;h=a3c10b793b2429d5d7c10a9bf786067ecaa83f69;hp=3018a349824a4ba3a287fa8305618767700152c5 Making simplejson a fallback for py<2.6 --- diff --git a/gonvert/gonvert_qt.py b/gonvert/gonvert_qt.py index c37b024..3cc50b6 100755 --- a/gonvert/gonvert_qt.py +++ b/gonvert/gonvert_qt.py @@ -8,7 +8,11 @@ from __future__ import with_statement import os import math -import simplejson +try: + import json as simplejson +except ImportError: + print "json not available, falling back to simplejson" + import simplejson import logging import logging.handlers diff --git a/setup.py b/setup.py index 90c1b0c..81047d2 100755 --- a/setup.py +++ b/setup.py @@ -157,7 +157,7 @@ setup( "copyright": "gpl", "changelog": CHANGES, "buildversion": str(BUILD), - "depends": "python, python-pyside.qtcore, python-pyside.qtgui, python-xdg, python-simplejson", + "depends": "python, python-pyside.qtcore, python-pyside.qtgui, python-xdg", "architecture": "any", }, "bdist_rpm": {