Merge "Entrypoints for commands"
This commit is contained in:
commit
5925313819
0
keystone/cmd/__init__.py
Normal file
0
keystone/cmd/__init__.py
Normal file
9
bin/keystone-all → keystone/cmd/all.py
Executable file → Normal file
9
bin/keystone-all → keystone/cmd/all.py
Executable file → Normal file
@ -18,9 +18,11 @@ import os
|
||||
import sys
|
||||
|
||||
|
||||
# If ../keystone/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
# If ../../keystone/__init__.py exists, add ../../ to Python search path, so
|
||||
# that it will override what happens to be installed in
|
||||
# /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(__file__),
|
||||
os.pardir,
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir,
|
||||
@ -32,5 +34,6 @@ if os.path.exists(os.path.join(possible_topdir,
|
||||
from keystone.server import eventlet as eventlet_server
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# entry point.
|
||||
def main():
|
||||
eventlet_server.run(possible_topdir)
|
9
bin/keystone-manage → keystone/cmd/manage.py
Executable file → Normal file
9
bin/keystone-manage → keystone/cmd/manage.py
Executable file → Normal file
@ -17,9 +17,11 @@
|
||||
import os
|
||||
import sys
|
||||
|
||||
# If ../keystone/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
# If ../../keystone/__init__.py exists, add ../../ to Python search path, so
|
||||
# that it will override what happens to be installed in
|
||||
# /usr/(local/)lib/python...
|
||||
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
||||
os.pardir,
|
||||
os.pardir,
|
||||
os.pardir))
|
||||
if os.path.exists(os.path.join(possible_topdir,
|
||||
@ -31,7 +33,8 @@ from keystone import cli
|
||||
from keystone.common import environment
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# entry point.
|
||||
def main():
|
||||
environment.use_stdlib()
|
||||
|
||||
dev_conf = os.path.join(possible_topdir,
|
@ -20,9 +20,6 @@ classifier =
|
||||
[files]
|
||||
packages =
|
||||
keystone
|
||||
scripts =
|
||||
bin/keystone-all
|
||||
bin/keystone-manage
|
||||
|
||||
[global]
|
||||
setup-hooks =
|
||||
@ -63,6 +60,10 @@ warnerrors = True
|
||||
#autodoc_tree_root = ./keystone
|
||||
|
||||
[entry_points]
|
||||
console_scripts =
|
||||
keystone-all = keystone.cmd.all:main
|
||||
keystone-manage = keystone.cmd.manage:main
|
||||
|
||||
oslo.config.opts =
|
||||
keystone = keystone.common.config:list_opts
|
||||
keystone.notifications = keystone.notifications:list_opts
|
||||
|
Loading…
Reference in New Issue
Block a user