Use json instead of simplejson library to avoid extra depedency

Simplejson is an externally mainainted version of json library available in
Python 2.6 and up. It supports Python 2.5 which were are not targetting.
It also boasts better speed which is not at all a factor for us.
This commit is contained in:
Sunil Mohan Adapa 2014-05-13 12:28:39 +05:30
parent be842a5baa
commit defcb43883
7 changed files with 6 additions and 25 deletions

View File

@ -4,7 +4,7 @@
Install the dependencies:
apt-get install libpython2.7 pandoc psmisc python2.7 python-bcrypt python-cherrypy3 python-django python-passlib python-simplejson python-bootstrapform libjs-twitter-bootstrap sudo
apt-get install libpython2.7 pandoc psmisc python2.7 python-bcrypt python-cherrypy3 python-django python-passlib python-bootstrapform libjs-twitter-bootstrap sudo
Unzip and untar the source into a directory. Change to the directory
containing the program. Run:

View File

@ -14,7 +14,7 @@ default: config dirs docs
all: default
predepend:
sudo sh -c "apt-get install libpython2.7 pandoc psmisc python2.7 python-bcrypt python-cherrypy3 python-django python-passlib python-simplejson python-bootstrapform libjs-twitter-bootstrap sudo"
sudo sh -c "apt-get install libpython2.7 pandoc psmisc python2.7 python-bcrypt python-cherrypy3 python-django python-passlib python-bootstrapform libjs-twitter-bootstrap sudo"
git submodule init
git submodule update
touch predepend

7
fabfile.py vendored
View File

@ -7,10 +7,7 @@
# plinth box
import os,sys, subprocess
try:
import simplejson as json
except ImportError:
import json
import json
import fabric.api
from fabric.api import local, env, cd, put, get, task
@ -150,7 +147,7 @@ def apache():
@task
def deps():
"Basic plinth dependencies"
sudo('apt-get install --no-install-recommends -y python make pandoc python-simplejson python-pyme python-django python-bootstrapform libjs-twitter-bootstrap')
sudo('apt-get install --no-install-recommends -y python make pandoc python-pyme python-django python-bootstrapform libjs-twitter-bootstrap')
@task
def update():

View File

@ -5,13 +5,9 @@ Author: Erez Shinan
Date : 31-May-2009
"""
try:
import simplejson as json ## jlv replaced pickle with json
except ImportError:
import json
import json
import UserDict
##import cPickle as pickle
import sqlite3

View File

@ -1,8 +1,3 @@
import os
try:
import simplejson as json
except ImportError:
import json
import cherrypy
import cfg
from model import User

View File

@ -7,10 +7,6 @@ haven't figured that one all the way through yet.
import os, sys
import cherrypy
try:
import simplejson as json
except ImportError:
import json
from gettext import gettext as _
from plugin_mount import PagePlugin
from modules.auth import require

View File

@ -23,10 +23,7 @@ import cherrypy
from django import forms
from django.core import validators
from gettext import gettext as _
try:
import simplejson as json
except ImportError:
import json
import json
import os
import socket