Permalink
Browse files

include simplejson 2.0.9 in couchapp so dependancy is required.

  • Loading branch information...
1 parent 541d3e2 commit 3804e261838490d3fa1e9645e3ddf3610b9710c7 @benoitc benoitc committed Nov 26, 2009
Showing with 2,013 additions and 256 deletions.
  1. +28 −0 bin/couchapp
  2. +37 −0 contrib/macosx/Readme.html
  3. +20 −0 contrib/macosx/Welcome.html
  4. +10 −0 contrib/macosx/build.txt
  5. +2 −4 couchapp/app.py
  6. +0 −1 couchapp/hooks.py
  7. +1 −1 couchapp/http.py
  8. +1 −1 couchapp/localdoc.py
  9. +5 −2 couchapp/macros.py
  10. +19 −0 couchapp/simplejson/LICENSE.txt
  11. +318 −0 couchapp/simplejson/__init__.py
  12. +351 −0 couchapp/simplejson/decoder.py
  13. +435 −0 couchapp/simplejson/encoder.py
  14. +63 −0 couchapp/simplejson/scanner.py
  15. +23 −0 couchapp/simplejson/tests/__init__.py
  16. +30 −0 couchapp/simplejson/tests/test_check_circular.py
  17. +22 −0 couchapp/simplejson/tests/test_decode.py
  18. +9 −0 couchapp/simplejson/tests/test_default.py
  19. +21 −0 couchapp/simplejson/tests/test_dump.py
  20. +38 −0 couchapp/simplejson/tests/test_encode_basestring_ascii.py
  21. +76 −0 couchapp/simplejson/tests/test_fail.py
  22. +15 −0 couchapp/simplejson/tests/test_float.py
  23. +41 −0 couchapp/simplejson/tests/test_indent.py
  24. +76 −0 couchapp/simplejson/tests/test_pass1.py
  25. +14 −0 couchapp/simplejson/tests/test_pass2.py
  26. +20 −0 couchapp/simplejson/tests/test_pass3.py
  27. +67 −0 couchapp/simplejson/tests/test_recursion.py
  28. +111 −0 couchapp/simplejson/tests/test_scanstring.py
  29. +42 −0 couchapp/simplejson/tests/test_separators.py
  30. +64 −0 couchapp/simplejson/tests/test_unicode.py
  31. +37 −0 couchapp/simplejson/tool.py
  32. +4 −12 couchapp/ui.py
  33. +5 −1 couchapp/utils.py
  34. +5 −13 setup.py
  35. +3 −7 tests/test_cli.py
  36. +0 −214 tests/test_couchapp.py
View
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+# -*- coding: utf-8 -*-
+#
+# Copyright 2008,2009 Benoit Chesneau <benoitc@e-engura.org>
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at#
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+try:
+ import couchapp.dispatch
+except ImportError:
+ import sys
+ sys.stderr.write("abort: couldn't find couchapp lib in [%s]\n" % sys.path)
+ sys.stderr.write("check your install.\n")
+ sys.exit(-1)
+
+
+couchapp.dispatch.run()
View
@@ -0,0 +1,37 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!-- This is the second screen displayed during the install. -->
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <title></title>
+ <style type="text/css">
+ p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
+ p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
+ p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
+ p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000fed}
+ span.s1 {text-decoration: underline}
+ span.s2 {font: 12.0px Courier}
+ </style>
+</head>
+<body>
+<p class="p1"><b>Before you install</b></p>
+<p class="p2"><br></p>
+<p class="p3">This is an OS X 10.6 version of Couchapp that depends on the default Python 2.6 installation.</p>
+<p class="p2"><br></p>
+<p class="p1"><b>After you install</b></p>
+<p class="p2"><br></p>
+<p class="p3">This package installs the <span class="s2">couchapp</span> executable in <span class="s2">/usr/local/bin</span> and the Couchapp files in <span class="s2">/Library/Python/2.6/site-packages/Couchapp.</span></p>
+<p class="p2"><br></p>
+<p class="p1"><b>Documentation</b></p>
+<p class="p2"><br></p>
+<p class="p3">Visit the <a href="http://benoitc.github.com/couchapp">Couchapp web site and wiki</a></p>
+<p class="p2"><br></p>
+<p class="p3">You can also visit the, <a href="http://couchdb.apache.org/">CouchDB website</a></p>
+<p class="p2"><br></p>
+<p class="p1"><b>Reporting problems</b></p>
+<p class="p2"><br></p>
+<p class="p3">If you run into any problems, please file a bug online:</p>
+<p class="p3"><a href="http://github.com/couchapp/couchapp/issues">http://github.com/couchapp/couchapp/issues</a></p>
+</body>
+</html>
@@ -0,0 +1,20 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<!-- This is the second screen displayed during the install. -->
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <title></title>
+ <style type="text/css">
+ p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Helvetica}
+ p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
+ </style>
+</head>
+<body>
+<p class="p1">This is a prepackaged release of <a href="http://benoitc.github.com/couchapp">couchapp</a> for Mac OS X.</p>
+<p class="p2"><br></p>
+<br>
+<p>
+Please be sure to read the latest <a href="http://benoitc.github.com/couchapp/changelog.htm">changes</a>.</p>
+</body>
+</html>
View
@@ -0,0 +1,10 @@
+To build a macosx dmg :
+
+
+install py2app from http://pythonmac.org/packages
+
+make sure /usr/local/bin is in your path
+
+run bdist_mpkg in top-level couchapp source directory
+
+find dmg in dist directory
View
@@ -22,7 +22,7 @@
try:
import json
except ImportError:
- import simplejson as json
+ import couchapp.simplejson as json
from couchapp.http import get_doc, fetch_attachment
from couchapp.utils import to_bytestring
@@ -243,9 +243,7 @@ def clone(ui, source, dest=None, rev=None):
def generate(ui, path, kind, name, **opts):
if kind not in ["app", "view", "list", "show", 'filter', 'function', 'vendor']:
raise AppError("Can't generate %s in your couchapp. generator is unknown" % kind)
-
-
-
+
if kind == "app":
generator.generate_app(ui, path, template=opts.get("template"),
create=opts.get('create', False))
View
@@ -27,7 +27,6 @@ def hook(ui, path, hooktype, **kwargs):
except Exception, e:
ui.logger.error("%s: invalid hook %s" % (hooktype, hook))
-
try:
mod = __import__(mod_name, {}, {}, [''])
except ImportError, e:
View
@@ -28,7 +28,7 @@
try:
import json
except ImportError:
- import simplejson as json
+ import couchapp.simplejson as json
url_parser = urlparse.urlparse
View
@@ -24,7 +24,7 @@
try:
import json
except ImportError:
- import simplejson as json
+ import couchapp.simplejson as json
from couchapp.http import *
from couchapp.errors import *
View
@@ -14,12 +14,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import anyjson
import glob
from hashlib import md5
import os
import re
import sys
+try:
+ import json
+except ImportError:
+ import couchapp.simplejson as json
from couchapp.errors import MacroError
from couchapp.utils import to_bytestring
@@ -125,6 +128,6 @@ def rjson2(mo):
return f_string
for k, v in included.iteritems():
- varstrings.append("var %s = %s;" % (k, anyjson.serialize(v)))
+ varstrings.append("var %s = %s;" % (k, json.dumps(v).encode('utf-8')))
return re_json.sub(rjson2, f_string)
@@ -0,0 +1,19 @@
+Copyright (c) 2006 Bob Ippolito
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
+of the Software, and to permit persons to whom the Software is furnished to do
+so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
Oops, something went wrong.

0 comments on commit 3804e26

Please sign in to comment.