Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pony_build.web.run mentioned in README not deployed #20

Open
khia opened this issue Jul 29, 2010 · 0 comments
Open

pony_build.web.run mentioned in README not deployed #20

khia opened this issue Jul 29, 2010 · 0 comments

Comments

@khia
Copy link

khia commented Jul 29, 2010

I was trying to run pony_build server and provided run-qx-server-old don't seem to be working for me.
I managed to start server by modifying couple of files:
diff --git a/setup.py b/setup.py
index 86d03fe..514fae9 100644
--- a/setup.py
+++ b/setup.py
@@ -37,4 +37,9 @@ setup(name='pony-build',
packages = ['pony_build', 'pony_build.web'],
data_files = data_files,
test_suite = 'nose.collector',
+ entry_points = {
+ 'console_scripts': [
+ 'pony_build_server.run = pony_build.web.main:main',
+ ]
+ }
)

rename web/run.py into web/main.py and making main function in it

cat pony_build/web/main.py 
from optparse import OptionParser
from .. import web as qx_web

def main():
#    import figleaf
#    figleaf.start()
    import sys
    parser = OptionParser()

    parser.add_option('-i', '--interface', dest='interface',
                      help='interface to bind', default='localhost')
    parser.add_option('-p', '--port', dest='port', help='port to bind',
                      type='int', default='8000')
    parser.add_option('-f', '--dbfile', dest='dbfile',
                     help='database filename', type='string',
                      default=':memory:')
    parser.add_option('-u', '--url', dest='url', help='public URL',
                      default=None)
    parser.add_option('-P', '--use-pubsubhubbub', dest='use_pubsubhubbub',
                      help='notify a pubsubhubbub server of changed RSS feeds',
                      action='store_true', default=False)
    parser.add_option('-S', '--set-pubsubhubbub-server', dest='push_server',
                      help='set the pubsubhubbub server to use',
                      type='str', default='http://pubsubhubbub.appspot.com/')


    (options, args) = parser.parse_args()

    if args:
        print "pony-build Web server doesn't take any arguments??  Maybe you meant to use '-f'"
        sys.exit(-1)

    push_server = None
    if options.use_pubsubhubbub:
        push_server = options.push_server

    qx_web.run(options.interface, options.port, options.dbfile, public_url=options.url,
               pubsubhubbub_server=push_server)

if __name__ == '__main__':
    main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant