Allow paunch to be called as a python module

Includes a test that we can succesfully call it as a module in order
to avoid regressions.

This is essential fix related to python3 work as the only way to
enforce a specific python interpreter to be used.

Change-Id: If5c4bda5ddc708bfb3701800cea46e89a026fb6e
Story: https://tree.taiga.io/project/tripleo-ci-board/task/361
This commit is contained in:
Sorin Sbarnea 2018-11-12 13:56:48 +00:00
parent 33042f3ce1
commit 7dd3bca83a
3 changed files with 15 additions and 6 deletions

View File

@ -24,9 +24,9 @@ packages =
[entry_points]
console_scripts =
paunch = paunch.main:main
paunch = paunch.__main__:main
paunch =
paunch =
apply = paunch.cmd:Apply
cleanup = paunch.cmd:Cleanup
delete = paunch.cmd:Delete
@ -59,3 +59,6 @@ output_file = paunch/locale/paunch.pot
all_files = 1
build-dir = releasenotes/build
source-dir = releasenotes/source
[wheel]
universal = 1

14
tox.ini
View File

@ -1,14 +1,20 @@
[tox]
minversion = 2.0
envlist = py35,py27,pep8
skipsdist = True
skipsdist = False
[testenv]
setenv = VIRTUAL_ENV={envdir}
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands = bash -c 'if [ ! -d ./.testrepository ] ; then testr init ; fi'
testr run {posargs}
install_command = pip install -U {opts} {packages}
whitelist_externals =
bash
commands =
python -m paunch --version
paunch --version
bash -c 'if [ ! -d ./.testrepository ] ; then testr init ; fi'
testr run {posargs}
[testenv:pep8]
basepython = python3