From f7882526b299e0e9185b1f61d3306b48d9ec28e6 Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Wed, 29 Nov 2017 16:40:39 +0800 Subject: Use pipenv instead of pip pipenv[1] is the officially recommended Python packaging tool from Python.org[2] [1]: https://docs.pipenv.org/ [2]: https://packaging.python.org/new-tutorials/installing-and-using-packages/ It integrates pip with virtualenv and handles version management better than pip. Change-Id: I4ec6436e29d76a866b56caa609e2bcd22489ae9f Signed-off-by: Yujun Zhang --- tox.ini | 36 ++++++++++++++---------------------- 1 file changed, 14 insertions(+), 22 deletions(-) (limited to 'tox.ini') diff --git a/tox.ini b/tox.ini index e5fe6e4e..37594bd6 100644 --- a/tox.ini +++ b/tox.ini @@ -9,20 +9,19 @@ skipsdist = True [testenv] usedevelop = True -install_command = pip install -U {opts} {packages} deps = - -rrequirements.txt - -rrequirements-test.txt -commands= - py.test \ - --basetemp={envtmpdir} \ - --cov \ - --cov-report term-missing \ - --cov-report xml \ - {posargs} -setenv= - HOME = {envtmpdir} - PYTHONPATH = {toxinidir} + pipenv +commands = + pipenv install --dev + py.test \ + --basetemp={envtmpdir} \ + --cov \ + --cov-report term-missing \ + --cov-report xml \ + {posargs} +setenv = + HOME = {envtmpdir} + PYTHONPATH = {toxinidir} [testenv:pep8] deps = flake8 @@ -37,19 +36,12 @@ ignore = E123,E125,H803,E501 builtins = _ exclude = build,dist,doc,legacy,.eggs,.git,.tox,.venv -[testenv:reqs] -deps=-rrequirements-test.txt -commands= - pip-missing-reqs qtip - pip-extra-reqs qtip - pipreqs qtip --savepath requirements-frozen.txt - [pytest] testpaths = tests python_functions = *_test test_* [testenv:pip] -deps= twine -commands= +deps = twine +commands = python setup.py sdist bdist_wheel twine upload dist/* -- cgit