This reverts commit a7b26690094e145adb5af4d133ee43b29caa8e11, and also introduces the install of the script in setup.py. It was pointed out that this script is useful to be on a system wide install since it's necessary for the rpm spec file to install and sync the database tables.
Signed-off-by: Lucas Meneghel Rodrigues <[email protected]> --- frontend/autotest-manage-rpc-server | 20 ++++++++++++++++++++ frontend/setup.py | 1 + 2 files changed, 21 insertions(+) create mode 100755 frontend/autotest-manage-rpc-server diff --git a/frontend/autotest-manage-rpc-server b/frontend/autotest-manage-rpc-server new file mode 100755 index 0000000..3c6c678 --- /dev/null +++ b/frontend/autotest-manage-rpc-server @@ -0,0 +1,20 @@ +#!/usr/bin/env python +try: + import autotest.common as common +except ImportError: + import common + +from django.core.management import execute_manager + +try: + try: + from autotest.frontend import settings + except ImportError: + import settings +except ImportError: + import sys + sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) + sys.exit(1) + +if __name__ == "__main__": + execute_manager(settings) diff --git a/frontend/setup.py b/frontend/setup.py index fda7942..7524ee2 100644 --- a/frontend/setup.py +++ b/frontend/setup.py @@ -54,4 +54,5 @@ setup(name='autotest', 'autotest.frontend.tko', 'autotest.frontend', ], + scripts=[os.path.join(fe_dir, 'autotest-manage-rpc-server')], ) -- 1.7.10.2 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
