Thanks a bunch! I think I found the problem. In paste-deploy.py, the
command "import site" occurs before sys.path is altered. Changing this
fixes the problem. ischenko noticed this previously, but until I
understood what was going on a little better, thanks to your
explanation, I hadn't thought that the "import site" line could have
been the problem. Here's ischenko's issue report:
http://code.google.com/p/appengine-monkey/issues/detail?id=15 .
I guess I'll submit the patch below to Ian B., also.
thanks a bunch,
bayle
Here is a revised shell script which patches paste-deploy.py:
#!/bin/sh
# newpylonsgae shell script
# example usage:
# newpylonsgae testsite /usr/local/google_appengine
name=$1; shift
#appengine_monkey_path=$1; shift
google_appengine_path=$1; shift
# google_appengine_path=/usr/local/google_appengine
# appengine_monkey_path=/home/bshanks/prog/appengine-monkey/
cat << EOF >appengine-monkey-patch
Index: paste-deploy.py
===================================================================
--- paste-deploy.py (revision 48)
+++ paste-deploy.py (working copy)
@@ -13,8 +13,6 @@
print >> sys.stderr, (
"$PYTHONPATH is set. This may cause import problems\; it is
best to unset PYTHONPATH before starting the appserver")
-import site
-site = reload(site)
import wsgiref.handlers
try:
@@ -24,6 +22,9 @@
# XXX Could become more sophisticated
sys.path = [path for path in sys.path if "site-packages" not in
path]
+ import site
+ site = reload(site)
+
# The "src" path is added to ensure to find our main app
(Problems under Windows)
sys.path.insert(0, os.path.join(here, "src", "myapp"))
EOF
svn checkout http://appengine-monkey.googlecode.com/svn/trunk
appengine-monkey
appengine_monkey_path=appengine-monkey
cd $appengine_monkey_path
patch < ../appengine-monkey-patch
cd ..
python $appengine_monkey_path/appengine-boot.py --no-site-packages --
unzip-setuptools --paste-deploy $name
cd $name
source bin/activate
easy_install --always-copy -U setuptools
bin/easy_install --always-copy Pylons
rm lib/python2.5/site-packages/simplejson-*-py2.5-*.egg/simplejson/
_speedups.py
cd src/
../bin/paster create -t pylons $name
# choose template engine; choose no sqlalchemy
cd $name
../../bin/python setup.py develop
../../bin/python -m pth_relpath_fixup
echo -e "[app:main]\nuse = config:src/$name/development.ini" > ../../
development.ini
perl -p -e 's/\Qbeaker.session.secret = somesecret\Q/
beaker.session.secret = somesecret\nbeaker.session.type = google
\nbeaker.session.table_name = Session/' -i development.ini
perl -p -e 's/module_directory/#module_directory/' -i $name/config/
environment.py
deactivate
cd ../../../
python $google_appengine_path/dev_appserver.py $name
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---