Browse Source

Use entrypoints for zuul-server.

If we put the code for zuul-server into the zuul module, then autodoc
will pick it up for documentation.

Change-Id: Idf2db82f706243c6e69984170b4783f1eece2237
Reviewed-on: https://review.openstack.org/16850
Reviewed-by: Clark Boylan <clark.boylan@gmail.com>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: James E. Blair <corvus@inaugust.com>
Tested-by: Jenkins
changes/51/16851/5
Monty Taylor 10 years ago committed by Jenkins
parent
commit
7df9e7ffe1
  1. 8
      setup.py
  2. 2
      tox.ini
  3. 0
      zuul/cmd/__init__.py
  4. 8
      zuul/cmd/server.py

8
setup.py

@ -35,7 +35,6 @@ setuptools.setup(
cmdclass=setup.get_cmdclass(),
install_requires=requires,
dependency_links=depend_links,
scripts=['zuul-server'],
zip_safe=False,
classifiers=[
'Environment :: Console',
@ -44,5 +43,10 @@ setuptools.setup(
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python'
]
],
entry_points={
'console_scripts': [
'zuul-server=zuul.cmd.server:main',
],
}
)

2
tox.ini

@ -18,7 +18,7 @@ setenv = NOSE_WITH_COVERAGE=1
[testenv:pyflakes]
deps = pyflakes
commands = pyflakes zuul zuul-server setup.py
commands = pyflakes zuul setup.py
[testenv:venv]
commands = {posargs}

0
zuul/cmd/__init__.py

8
zuul-server → zuul/cmd/server.py

@ -1,4 +1,3 @@
#!/usr/bin/env python
# Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
@ -19,7 +18,7 @@ import daemon
try:
import daemon.pidlockfile as pid_file_module
pid_file_module # workaround for pyflakes issue #13
pid_file_module # workaround for pyflakes issue #13
except:
# as of python-daemon 1.6 it doesn't bundle pidlockfile anymore
# instead it depends on lockfile-0.9.1 which uses pidfile.
@ -105,9 +104,10 @@ class Server(object):
signal.pause()
except KeyboardInterrupt:
print "Ctrl + C: asking scheduler to exit nicely...\n"
self.exit_handler( signal.SIGINT, None )
self.exit_handler(signal.SIGINT, None)
if __name__ == '__main__':
def main():
server = Server()
server.parse_arguments()
server.read_config()
Loading…
Cancel
Save