Merge "Move manage.py to ara.server.__main__ and add an entry point"
This commit is contained in:
commit
b93cf0d33d
|
@ -2,7 +2,8 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
def main():
|
||||
from ara import server
|
||||
|
||||
os.environ.setdefault("ARA_CFG", os.path.dirname(server.__file__) + "/configs/dev.cfg")
|
||||
|
@ -11,3 +12,7 @@ if __name__ == "__main__":
|
|||
from django.core.management import execute_from_command_line
|
||||
|
||||
execute_from_command_line(sys.argv)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -29,6 +29,10 @@ setup-hooks =
|
|||
packages =
|
||||
ara
|
||||
|
||||
[entry_points]
|
||||
console_scripts =
|
||||
ara-manage = ara.server.__main__:main
|
||||
|
||||
[build_sphinx]
|
||||
source-dir = doc/source
|
||||
build-dir = doc/build
|
||||
|
|
12
tox.ini
12
tox.ini
|
@ -21,15 +21,15 @@ commands = sphinx-build -W -b html doc/source doc/build/html
|
|||
commands = {toxinidir}/tests/linters.sh
|
||||
|
||||
[testenv:py3]
|
||||
commands = python manage.py test ara
|
||||
commands = ara-manage test ara
|
||||
setenv =
|
||||
ARA_CFG={toxinidir}/ara/server/configs/test.cfg
|
||||
|
||||
[testenv:runserver]
|
||||
commands =
|
||||
python manage.py migrate
|
||||
python manage.py collectstatic --clear --no-input
|
||||
python manage.py runserver
|
||||
ara-manage migrate
|
||||
ara-manage collectstatic --clear --no-input
|
||||
ara-manage runserver
|
||||
|
||||
# Temporary venv to help bootstrap integration
|
||||
[testenv:ansible-integration]
|
||||
|
@ -49,6 +49,6 @@ whitelist_externals =
|
|||
[testenv:cover]
|
||||
commands =
|
||||
coverage erase
|
||||
coverage run {toxinidir}/manage.py test ara/server
|
||||
coverage run -a {toxinidir}/manage.py test ara/api
|
||||
coverage run {toxinidir}/ara/server/__main__.py test ara/server
|
||||
coverage run -a {toxinidir}/ara/server/__main__.py test ara/api
|
||||
coverage html
|
||||
|
|
Loading…
Reference in New Issue