switch to simplejson and complete setup.py

This commit is contained in:
Jan Dittberner 2009-01-20 16:14:35 +01:00
parent 8e6a6f74e5
commit 2cf7e9d67a
2 changed files with 9 additions and 5 deletions

View file

@ -3,7 +3,7 @@
from paste.request import parse_formvars from paste.request import parse_formvars
import pkg_resources import pkg_resources
import minjson import simplejson
from ConfigParser import ConfigParser from ConfigParser import ConfigParser
from urllib import quote_plus from urllib import quote_plus
@ -31,7 +31,7 @@ def app(environ, start_response):
data = build_urls(fields) data = build_urls(fields)
if ('mode' in fields and fields['mode'] == 'json'): if ('mode' in fields and fields['mode'] == 'json'):
start_response('200 OK', [('content-type', 'text/json')]) start_response('200 OK', [('content-type', 'text/json')])
return [minjson.write(data)] return [simplejson.dumps(data)]
else: else:
start_response('200 OK', [('content-type', 'text/html')]) start_response('200 OK', [('content-type', 'text/html')])
return ['''<html> return ['''<html>

View file

@ -26,9 +26,13 @@ array of URLs.""",
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True, include_package_data=True,
zip_safe=False, zip_safe=False,
package_data= {
'ddportfolioservice' : ['*.ini'],
},
install_requires=[ install_requires=[
# -*- Extra requirements: -*- # -*- Extra requirements: -*-
'Paste',
'PasteDeploy', 'PasteDeploy',
'python-json' 'simplejson'
], ],
) )