On Feb 12, 2011, at 3:12 AM, Carl wrote:
> 
> I've avoided editing oauth10a_account.py by moving the directory
> oauth2 to web2py (and keeping httplib2 inside oauth2.
> 
> Not happy that I've put this in Web2py's root but I've avoided editing
> the framework source and don't need to worry about overwriting files
> when I upgrade Web2py.
> 
> On Feb 11, 1:46 pm, Carl <[email protected]> wrote:
>> I'm using OAuth/LinkedIn on GAE.
>> 
>> To get oauth/LinkedIn to run on dev_appserver/GAE I had to copy
>> directory oauth2 from web2py/site-packages to web2py/gluon/contrib and
>> httplib2 from site-packages to web2py/gluon/contrib/oauth2
>> 
>> Then in oauth10a_account.py change "import oauth2 as oauth" to "import
>> gluon.contrib.oauth2 as oauth".
>> 
>> Bingo.
>> 
>> But.. is there a convention that will make web2py upgrades
>> straightforward?

Two questions:

1. What web2py version are you using?

B. What happens when oauth2 is in site-packages?

3. Where is your import? (OK, three questions.)

Recently (and I'll have to do some research to find out exactly when), we made 
some changes in this area. It used to be that the handling of web2py's 
additions to sys.path were somewhat erratic, and dependent on which handler was 
in use. The changes were to make it consistent across handlers. In particular 
(at least in the trunk), both the web2py root and site-packages should be at 
the beginning of sys.path by the time you do your import.

Could you please log sys.path at the time you do your import (or save a copy 
and display it later)? Thanks.

Reply via email to