Merge "Use console_scripts instead of bin"
This commit is contained in:
commit
5c2e288fa8
@ -1,27 +0,0 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
# Copyright (c) 2013 Mirantis Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
# implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
sys.path.insert(0, os.getcwd())
|
||||
|
||||
from savanna.db.migration.cli import main
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
0
savanna/cmd/__init__.py
Normal file
0
savanna/cmd/__init__.py
Normal file
@ -15,11 +15,13 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
import eventlet
|
||||
from eventlet import wsgi
|
||||
import os
|
||||
from oslo.config.cfg import CONF
|
||||
import sys
|
||||
|
||||
from oslo.config import cfg
|
||||
|
||||
# If ../savanna/__init__.py exists, add ../ to Python search path, so that
|
||||
# it will override what happens to be installed in /usr/(local/)lib/python...
|
||||
@ -52,8 +54,5 @@ def main():
|
||||
|
||||
app = server.make_app()
|
||||
|
||||
wsgi.server(eventlet.listen((CONF.host, CONF.port), backlog=500), app)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
wsgi.server(eventlet.listen((cfg.CONF.host, cfg.CONF.port), backlog=500),
|
||||
app)
|
@ -16,6 +16,11 @@
|
||||
# Based on Quantum's migration/cli.py
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
|
||||
sys.path.insert(0, os.getcwd())
|
||||
|
||||
|
||||
from alembic import command as alembic_cmd
|
||||
from alembic import config as alembic_cfg
|
||||
|
10
setup.py
10
setup.py
@ -52,10 +52,12 @@ setuptools.setup(
|
||||
setup_requires=['setuptools-git>=0.4'],
|
||||
include_package_data=True,
|
||||
test_suite='nose.collector',
|
||||
scripts=[
|
||||
'bin/savanna-api',
|
||||
'bin/savanna-db-manage',
|
||||
],
|
||||
entry_points={
|
||||
'console_scripts': [
|
||||
'savanna-api = savanna.cmd.savanna_api:main',
|
||||
'savanna-db-manage = savanna.db.migration.cli:main',
|
||||
]
|
||||
},
|
||||
py_modules=[],
|
||||
data_files=[
|
||||
('share/savanna',
|
||||
|
Loading…
Reference in New Issue
Block a user