Merge lp:~jml/libdep-service/buildout-wsgi into lp:libdep-service

Proposed by Jonathan Lange
Status: Merged
Approved by: Jonathan Lange
Approved revision: 76
Merged at revision: 76
Proposed branch: lp:~jml/libdep-service/buildout-wsgi
Merge into: lp:libdep-service
Diff against target: 102 lines (+58/-0)
4 files modified
.bzrignore (+1/-0)
buildout-templates/django.wsgi.in (+49/-0)
buildout.cfg (+7/-0)
versions.cfg (+1/-0)
To merge this branch: bzr merge lp:~jml/libdep-service/buildout-wsgi
Reviewer Review Type Date Requested Status
Canonical Consumer Applications Hackers Pending
Review via email: mp+132300@code.launchpad.net

Commit message

Generate a wsgi file with buildout

Description of the change

Straight up application of the change to pkgme-service to here.

To post a comment you must log in.
Revision history for this message
ISD Branch Mangler (isd-branches-mangler) wrote :

The attempt to merge lp:~jml/libdep-service/buildout-wsgi into lp:libdep-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/libdep-service/buildout-wsgi into lp:libdep-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
1=== modified file '.bzrignore'
2--- .bzrignore 2012-10-25 14:00:07 +0000
3+++ .bzrignore 2012-10-31 11:22:21 +0000
4@@ -12,5 +12,6 @@
5 ./eggs
6 ./parts
7 ./bin/*
8+django.wsgi
9 dist
10 download-cache
11
12=== added directory 'buildout-templates'
13=== added file 'buildout-templates/django.wsgi.in'
14--- buildout-templates/django.wsgi.in 1970-01-01 00:00:00 +0000
15+++ buildout-templates/django.wsgi.in 2012-10-31 11:22:21 +0000
16@@ -0,0 +1,49 @@
17+#!${buildout:executable} -S
18+
19+# Initialize our paths. This is the boilerplate that would be added by
20+# $${python-relative-path-setup} changed to work with mod_wsgi
21+import os, imp
22+# Get path to this file.
23+if __name__ == '__main__' or __name__.startswith("_mod_wsgi"):
24+ _z3c_recipe_filetemplate_filename = __file__
25+else:
26+ # If this is an imported module, we want the location of the .py
27+ # file, not the .pyc, because the .py file may have been symlinked.
28+ _z3c_recipe_filetemplate_filename = imp.find_module(__name__)[1]
29+# Get the full, non-symbolic-link directory for this file.
30+_z3c_recipe_filetemplate_base = os.path.dirname(
31+ os.path.abspath(os.path.realpath(_z3c_recipe_filetemplate_filename)))
32+# This is the buildout root.
33+def _z3c_recipe_filetemplate_path_repr(path):
34+ "Return absolute version of buildout-relative path."
35+ return os.path.join(_z3c_recipe_filetemplate_base, path)
36+import sys
37+sys.path[0:0] = [
38+ ${string-paths}
39+ ]
40+
41+import os
42+
43+os.environ['DJANGO_SETTINGS_MODULE'] = 'django_project.settings'
44+
45+from django.conf import settings
46+
47+# This is needed to workaround a bug in DJango, see the file it is
48+# implemented in for more details.
49+from oops_wsgi.django import OOPSWSGIHandler
50+
51+application = OOPSWSGIHandler()
52+
53+# Wrap the application in the Oops wsgi app to catch unhandled exceptions
54+# and create oops for them.
55+#
56+# First we create the config that defines what to do with the oopses.
57+
58+import oops_dictconfig
59+from oops_wsgi import make_app, install_hooks
60+
61+config = oops_dictconfig.config_from_dict(settings.OOPSES)
62+install_hooks(config)
63+
64+# Then we wrap the django app in the oops one
65+application = make_app(application, config, oops_on_status=['500'])
66
67=== modified file 'buildout.cfg'
68--- buildout.cfg 2012-10-25 14:00:07 +0000
69+++ buildout.cfg 2012-10-31 11:22:21 +0000
70@@ -4,6 +4,7 @@
71 [buildout]
72 parts =
73 scripts
74+ filetemplates
75 unzip = true
76 use-dependency-links = false
77 eggs-directory = eggs
78@@ -26,6 +27,12 @@
79
80 develop = .
81
82+
83+[filetemplates]
84+recipe = z3c.recipe.filetemplate
85+source-directory = buildout-templates
86+eggs = ${scripts:eggs}
87+
88 [scripts]
89 recipe = z3c.recipe.scripts
90 # Test dependencies get added here
91
92=== modified file 'versions.cfg'
93--- versions.cfg 2012-10-29 17:06:07 +0000
94+++ versions.cfg 2012-10-31 11:22:21 +0000
95@@ -67,6 +67,7 @@
96 txstatsd = 0.0.pre.r100
97 wadllib = 1.3.1
98 wsgi-intercept = 0.5.1
99+z3c.recipe.filetemplate = 2.2.0
100 z3c.recipe.scripts = 1.0.1
101 # Also upgrade the zc.buildout version in the Makefile's bin/buildout section.
102 zc.buildout = 1.5.1

Subscribers

People subscribed via source and target branches