# HG changeset patch # User Jeff Hammel # Date 1345481358 25200 # Node ID 0f5c22c0714631807c563b9c66d53e74a6766bbc # Parent 22c35af93ef8b8bf645868de94c932e5fd0af2e7 add interface for paste since wsgiref falls over in production diff -r 22c35af93ef8 -r 0f5c22c07146 paste.ini --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paste.ini Mon Aug 20 09:49:18 2012 -0700 @@ -0,0 +1,21 @@ +#!/usr/bin/env paster + +[DEFAULT] +debug = true +email_to = jhammel@mozmilla.com +smtp_server = localhost +error_email_from = talosnames@localhost + +[server:main] +use = egg:Paste#http +host = 0.0.0.0 +port = 8080 + +[composite:main] +use = egg:Paste#urlmap +/ = talosnames + +set debug = false + +[app:talosnames] +paste.app_factory = talosnames.web:paste_factory diff -r 22c35af93ef8 -r 0f5c22c07146 setup.py --- a/setup.py Thu Aug 16 16:54:36 2012 -0700 +++ b/setup.py Mon Aug 20 09:49:18 2012 -0700 @@ -5,7 +5,7 @@ import os version = "0.0" -dependencies = ['webob', 'CommandParser', 'talos', 'buildbot', 'PyYAML'] +dependencies = ['webob', 'CommandParser', 'talos', 'buildbot', 'PyYAML', 'PasteScript'] try: import json @@ -42,7 +42,7 @@ author='Jeff Hammel', author_email='jhammel@mozilla.com', url='', - license='', + license='MPL', packages=['talosnames'], include_package_data=True, zip_safe=False, diff -r 22c35af93ef8 -r 0f5c22c07146 talosnames/web.py --- a/talosnames/web.py Thu Aug 16 16:54:36 2012 -0700 +++ b/talosnames/web.py Mon Aug 20 09:49:18 2012 -0700 @@ -141,7 +141,14 @@ template = self.paths.get(path, 'index.html') return os.path.join(here, 'templates', template) +def paste_factory(global_conf, **app_conf): + """factory interface for paste""" + app = Handler(**app_conf) + return app + def main(args=sys.argv[1:]): + """CLI entry point""" + parser = optparse.OptionParser() parser.add_option('-o', '--output', dest='output', help="file to output to")