summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAsk Solem <ask@rabbitmq.com>2011-12-06 12:07:13 +0000
committerAsk Solem <ask@rabbitmq.com>2011-12-06 12:07:13 +0000
commit5cd8a78dfee4cfa59849b17cd8b9c8efd740d797 (patch)
treec60280212dac730f7d0ba3d3a7c391cda3c458ed
parent994fdaf49b2ebbc985d69b4f24ed285816659da1 (diff)
downloadanyjson-5cd8a78dfee4cfa59849b17cd8b9c8efd740d797.tar.gz
Now depends on simlejson if no other json libs installed
-rw-r--r--setup.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 3b4ee00..9fe4902 100644
--- a/setup.py
+++ b/setup.py
@@ -52,6 +52,19 @@ finally:
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"],
@@ -60,6 +73,7 @@ setup(name='anyjson',
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',