Making simplejson a fallback for py<2.6
authorEd Page <eopage@byu.net>
Fri, 12 Aug 2011 01:30:09 +0000 (20:30 -0500)
committerEd Page <eopage@byu.net>
Fri, 12 Aug 2011 01:30:09 +0000 (20:30 -0500)
gonvert/gonvert_qt.py
setup.py

index c37b024..3cc50b6 100755 (executable)
@@ -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
 
index 90c1b0c..81047d2 100755 (executable)
--- 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": {