python-tuf/tox.ini
Jussi Kukkonen 5db7e2d8ca tox: Workaround double dep in with-sslib-master
Commit eb00d14 modified requirements-pinned.txt so that sslib specifiers
are now "[crypto,pynacl]". This happens to match the exact specifiers
used for the sslib git master dependency in tox.ini. This triggers pip
to say:
  ERROR: Double requirement given: securesystemslib[crypto,pynacl]==0.16.0
  (from -r /home/jku/src/tuf/requirements-pinned.txt (line 12)) (already
  in securesystemslib[crypto,pynacl] from
  git+http://github.com/secure-systems-lab/securesystemslib.git@master#egg=securesystemslib[crypto,pynacl],
  name='securesystemslib')

Avoid this by not setting any specifiers for the sslib git master
dependency in tox.ini: This makes pip happy and we get the git master
version installed. pynacl and crypto are still installed because they
are in requirements-pinned.txt.

Fixes #1184.

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
2020-10-22 12:50:41 +03:00

45 lines
1.5 KiB
INI

# Tox (https://tox.readthedocs.io/en/latest/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = lint,py{27,35,36,37,38}
skipsdist = true
[testenv]
# TODO: Consider refactoring the tests to not require the aggregation script
# being invoked from the `tests` directory. This seems to be the convention and
# would make use of other testing tools such as coverage/coveralls easier.
changedir = tests
commands =
coverage run aggregate_tests.py
coverage report -m --fail-under 97
deps =
-r{toxinidir}/requirements-test.txt
# Install TUF in editable mode, instead of tox default virtual environment
# installation (see `skipsdist`), to get relative paths in coverage reports
--editable {toxinidir}
install_command = pip install --pre {opts} {packages}
# Develop test env to run tests against securesystemslib's master branch
# Must to be invoked explicitly with, e.g. `tox -e with-sslib-master`
[testenv:with-sslib-master]
deps =
--editable git+http://github.com/secure-systems-lab/securesystemslib.git@master#egg=securesystemslib
-r{toxinidir}/requirements-test.txt
--editable {toxinidir}
commands =
coverage run aggregate_tests.py
coverage report -m
[testenv:lint]
commands =
pylint {toxinidir}/tuf --ignore={toxinidir}/tuf/api
pylint {toxinidir}/tuf/api --rcfile={toxinidir}/tuf/api/pylintrc
bandit -r {toxinidir}/tuf