Skip to content

Commit

Permalink
frontend: Re-create autotest-manage-rpc-server and add it to setup.py
Browse files Browse the repository at this point in the history
This reverts commit a7b2669,
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]>
  • Loading branch information
lmr committed Jun 11, 2012
1 parent 031a251 commit 0f37c72
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions frontend/autotest-manage-rpc-server
Original file line number Diff line number Diff line change
@@ -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)
1 change: 1 addition & 0 deletions frontend/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ def get_data_files(path):
'autotest.frontend.tko',
'autotest.frontend',
],
scripts=[os.path.join(fe_dir, 'autotest-manage-rpc-server')],
)

0 comments on commit 0f37c72

Please sign in to comment.