Remove the bundled version of simplejson on the autotest
tree, in order to be coherent with the general policy of
just requiring that the server admin install external
dependencies. For simplejson, it's not necessary to
maintain the module on our tree, since we are mostly
using a version very close to upstream 2.0.9.
Also, added simplejson to utils/build_externals.py, to
make installation straightforward in case one doesn't
want/can use the package shipped by the distro.
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4088 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/afe/json_rpc/proxy.py b/frontend/afe/json_rpc/proxy.py
index c39fd92..26987ff 100644
--- a/frontend/afe/json_rpc/proxy.py
+++ b/frontend/afe/json_rpc/proxy.py
@@ -20,7 +20,7 @@
"""
import urllib2
-from autotest_lib.frontend.afe.simplejson import decoder, encoder
+from simplejson import decoder, encoder
json_encoder = encoder.JSONEncoder()
json_decoder = decoder.JSONDecoder()
diff --git a/frontend/afe/json_rpc/serviceHandler.py b/frontend/afe/json_rpc/serviceHandler.py
index 6902d88..4d85fc0 100644
--- a/frontend/afe/json_rpc/serviceHandler.py
+++ b/frontend/afe/json_rpc/serviceHandler.py
@@ -21,7 +21,7 @@
import traceback
-from autotest_lib.frontend.afe.simplejson import decoder, encoder
+from simplejson import decoder, encoder
def customConvertJson(value):
"""\
diff --git a/new_tko/tko/graphing_utils.py b/new_tko/tko/graphing_utils.py
index 49afdc1..af3cffb 100644
--- a/new_tko/tko/graphing_utils.py
+++ b/new_tko/tko/graphing_utils.py
@@ -22,7 +22,7 @@
import StringIO, colorsys, PIL.Image, PIL.ImageChops
from autotest_lib.frontend.afe import readonly_connection
from autotest_lib.frontend.afe.model_logic import ValidationError
-from autotest_lib.frontend.afe.simplejson import encoder
+from simplejson import encoder
from autotest_lib.client.common_lib import global_config
from autotest_lib.new_tko.tko import models, tko_rpc_utils
diff --git a/utils/build_externals.py b/utils/build_externals.py
index 6244699..d58975e 100755
--- a/utils/build_externals.py
+++ b/utils/build_externals.py
@@ -737,6 +737,18 @@
return True
+class SimplejsonPackage(ExternalPackage):
+ version = '2.0.9'
+ local_filename = 'simplejson-%s.tar.gz' % version
+ urls = ('http://pypi.python.org/packages/source/s/simplejson/' +
+ local_filename,)
+ hex_sum = 'b5b26059adbe677b06c299bed30557fcb0c7df8c'
+
+ _build_and_install = ExternalPackage._build_and_install_from_package
+ _build_and_install_current_dir = (
+ ExternalPackage._build_and_install_current_dir_setup_py)
+
+
class GwtPackage(ExternalPackage):
"""Fetch and extract a local copy of GWT used to build the frontend."""