Arachnid / aeoid

Easy OpenID support for App Engine
47 stars 3 forks source link

Make beaker and python-openid into subpackages. #2

Open Arachnid opened 14 years ago

Arachnid commented 14 years ago

Modify the beaker and python-openid libraries to be subpackages, so they can be imported directly rather than requiring path manipulations, which may interfere with frameworks that include one or both of these libraries. This will require changing import statements throughout the libraries.

modkit commented 14 years ago

I am having trouble understanding what kind of path manipulation is expected to run the demo..

If one simply unzips the source, importing aeoid will fail as aoed is below the application's root (demo) directory.. There is an aeoid file in the root directory which appears to be some kind of symbolic link (similar to python .pth file) but the import still fails with:

<type 'exceptions.ImportError'>: No module named aeoid Traceback (most recent call last): File "/base/data/home/apps/myplaysandbox/1.339184968998741476/main.py", line 25, in from aeoid import middleware, users

So assuming aeoid was just pulled out of your demo dir when posted to github, and following the instructions in readme.markdown to "copy the 'aeoid' subdirectory into your App Engine app's root directory", I removed this aeoid (symlink) file and replaced it with the actual aeoid directory.

The demo then serves on AE but fails to import beaker on dev_appserver (App Engine SDK 1.3.0) on Windows XP:

File "C:\Documents and Settings\1\Desktop\demo\aeoid\beaker\middleware.py", line 11, in from beaker.cache import CacheManager ImportError: No module named beaker.cache

Modifying imports throughout the beaker module module (all beaker references become aeoid.beaker) solves this, but I'm not sure what is intended..

Arachnid commented 14 years ago

Check out the demo app. You need to add aeoid's parent directory to your path; it should add the directory containing beaker and openid itself.