Add setup.py for install with pip

Make possible installation with pip.
Change-Id: I8eec015142c4f29eadff0dac2781782b76dea308
This commit is contained in:
Sagi Shnaidman
2020-05-22 21:22:46 +03:00
parent f3610ad0e1
commit c9da50e7e7
5 changed files with 81 additions and 8 deletions

16
tox.ini
View File

@@ -8,7 +8,9 @@ ignore_basepython_conflict = True
skip_install = True
install_command = python -m pip install {opts} {packages}
basepython = python3
passenv = OS_*
passenv =
OS_*
pip: PIP_INSTALL
setenv =
VIRTUAL_ENV={envdir}
LANG=en_US.UTF-8
@@ -17,8 +19,10 @@ setenv =
OS_LOG_CAPTURE={env:OS_LOG_CAPTURE:true}
OS_STDOUT_CAPTURE={env:OS_STDOUT_CAPTURE:true}
OS_STDERR_CAPTURE={env:OS_STDERR_CAPTURE:true}
pip: PIP_INSTALL={env:PIP_INSTALL:true}
deps =
-r{toxinidir}/test-requirements.txt
pip: {toxinidir}
commands = stestr run {posargs}
stestr slowest
@@ -36,6 +40,7 @@ deps =
ruamel.yaml
galaxy-importer
git+https://github.com/ansible/ansible
commands =
python {toxinidir}/tools/build.py
ansible-galaxy collection build --force {toxinidir} --output-path {toxinidir}/build_artifact
@@ -66,8 +71,15 @@ exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build,ansible_collections
[testenv:ansible]
# Need to pass some env vars for the Ansible playbooks
passenv = HOME USER ANSIBLE_VAR_*
passenv =
HOME
USER
ANSIBLE_*
deps =
{[testenv]deps}
commands =
/bin/bash {toxinidir}/ci/run-ansible-tests-collection.sh -e {envdir} {posargs}
[testenv:ansible-pip]
passenv = {[testenv:ansible]passenv}
commands = {[testenv:ansible]commands}