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
This commit is contained in:
parent
2747501dee
commit
7df9e7ffe1
8
setup.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
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}
|
||||
|
|
|
@ -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
|
||||
|
@ -107,7 +106,8 @@ class Server(object):
|
|||
print "Ctrl + C: asking scheduler to exit nicely...\n"
|
||||
self.exit_handler(signal.SIGINT, None)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
def main():
|
||||
server = Server()
|
||||
server.parse_arguments()
|
||||
server.read_config()
|
Loading…
Reference in New Issue