Merge lp://qastaging/~jml/pkgme-service/buildout-wsgi into lp://qastaging/pkgme-service

Proposed by Jonathan Lange
Status: Merged
Approved by: Jonathan Lange
Approved revision: 139
Merged at revision: 138
Proposed branch: lp://qastaging/~jml/pkgme-service/buildout-wsgi
Merge into: lp://qastaging/pkgme-service
Diff against target: 121 lines (+61/-0)
5 files modified
.bzrignore (+1/-0)
buildout-templates/django.wsgi.in (+49/-0)
buildout.cfg (+7/-0)
setup.py (+1/-0)
versions.cfg (+3/-0)
To merge this branch: bzr merge lp://qastaging/~jml/pkgme-service/buildout-wsgi
Reviewer Review Type Date Requested Status
James Westby (community) Approve
Review via email: mp+132157@code.qastaging.launchpad.net

Commit message

Build django.wsgi in buildout

Description of the change

I'm not sure if this will work, as I haven't tested it.

What I've done is added a buildout-templates/ directory, copied the WSGI
from memento, removed the path manipulation guff and replaced it with
something I picked up from Launchpad's buildout.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

Hi,

The first I encountered was that the relative path setup fails because mod_wsgi
does something funky when importing so that __name__ can't be found by imp.
I worked around this by putting the relative path stuff in the template and hacking
it to work for mod_wsgi.

The next issue was that none of the eggs were being imported because site was
already imported, so the buildout one wasn't being used. I worked around this by
altering the approach used. It doesn't isolate the app from site-packages, but I
don't see how it's possible to do that with mod_wsgi.

I've proposed my changes in to your branch so you can see what I did.

Thanks,

James

Revision history for this message
Jonathan Lange (jml) wrote :

On 30 October 2012 18:25, James Westby <email address hidden> wrote:
> Hi,
>
> The first I encountered was that the relative path setup fails because mod_wsgi
> does something funky when importing so that __name__ can't be found by imp.
> I worked around this by putting the relative path stuff in the template and hacking
> it to work for mod_wsgi.
>
> The next issue was that none of the eggs were being imported because site was
> already imported, so the buildout one wasn't being used. I worked around this by
> altering the approach used. It doesn't isolate the app from site-packages, but I
> don't see how it's possible to do that with mod_wsgi.
>
> I've proposed my changes in to your branch so you can see what I did.

Thanks, I've merged it into this one.

jml

Revision history for this message
James Westby (james-w) :
review: Approve
Revision history for this message
ISD Branch Mangler (isd-branches-mangler) wrote :

The attempt to merge lp:~jml/pkgme-service/buildout-wsgi into lp:pkgme-service failed. Below is the output from the failed tests.

Tree is up to date at revision 42 of branch bzr+ssh://bazaar.launchpad.net/+branch/ca-download-cache
Couldn't find index page for 'z3c.recipe.filetemplate' (maybe misspelled?)
While:
  Installing.
  Getting section filetemplates.
  Initializing section filetemplates.
  Installing recipe z3c.recipe.filetemplate.
  Getting distribution for 'z3c.recipe.filetemplate==2.2.0'.
Error: Couldn't find a distribution for 'z3c.recipe.filetemplate==2.2.0'.
make: *** [bin/py] Error 1

Revision history for this message
ISD Branch Mangler (isd-branches-mangler) wrote :

The attempt to merge lp:~jml/pkgme-service/buildout-wsgi into lp:pkgme-service failed. Below is the output from the failed tests.

Tree is up to date at revision 42 of branch bzr+ssh://bazaar.launchpad.net/+branch/ca-download-cache
Couldn't find index page for 'z3c.recipe.filetemplate' (maybe misspelled?)
While:
  Installing.
  Getting section filetemplates.
  Initializing section filetemplates.
  Installing recipe z3c.recipe.filetemplate.
  Getting distribution for 'z3c.recipe.filetemplate==2.2.0'.
Error: Couldn't find a distribution for 'z3c.recipe.filetemplate==2.2.0'.
make: *** [bin/py] Error 1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches