Merge "Allow ARA module to be run"

This commit is contained in:
Zuul 2018-04-28 16:21:06 +00:00 committed by Gerrit Code Review
commit 59273417e4
2 changed files with 33 additions and 1 deletions

23
ara/__main__.py Normal file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env python
# Copyright (c) 2018 Red Hat, Inc.
#
# This file is part of ARA Records Ansible.
#
# ARA is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ARA is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with ARA. If not, see <http://www.gnu.org/licenses/>.
from ara.shell import main
import sys
if __name__ == '__main__':
sys.exit(main(sys.argv[1:]))

View File

@ -54,4 +54,13 @@ Installing ARA from latest release on PyPi
::
pip install ara
pip install [--user] ara
When installing ARA using ``--user``, command line scripts will be installed
inside ``~/.local/bin`` folder which may not be in ``PATH``. You may want to
assure that this folder is in PATH or to use the alternative calling method
``pyhton -m ara`` which calls Ansible module directly.
The alternative calling method has the advantage that allows user to control
which python interpreter would be used. For example you could install ARA in
both python2 and python3 and call the one you want.