Commits

Ask Solem  committed c67742f

Now depends on simlejson if no other json libs installed

  • Participants
  • Parent commits 93b039e

Comments (0)

Files changed (1)

     meta_fh.close()
 
 
+supported = ["yajl", "jsonlib2", "jsonlib", "simplejson",
+             "json", "django.utils.simplejson", "cjson"]
+install_requires = []
+for module in supported:
+    try:
+        __import__(module)
+        break
+    except ImportError:
+        pass
+else:
+    install_requires.append("simplejson")
+
+
 setup(name='anyjson',
       version=meta["VERSION"],
       description=meta["doc"],
       url=meta["homepage"],
       license='BSD',
       long_description=open("README").read(),
+      install_requires=install_requires,
       classifiers=[
             'Development Status :: 5 - Production/Stable',
             'License :: OSI Approved :: BSD License',