ef1a35f4e1
We do this because easy_install on python3.5 is failing to find pbr. I believe this is happening due to pypi's deprecation of non SNI tls connections. They report that the version of 3.5 on xenial should be able to do SNI but easy_install at least doesn't seem to do so. Note we restrict this to python>=3 and <=3.5 as python 2.7 had backported fixes. Also, this really only helps with unittesting via tox as we instruct tox to explicitly install the requirements files before creating/installing the package itself. This is the reason we stick this in test-requirements.txt rather than requirements.txt. Change-Id: Iac2c1f4f575de250ed0dba22d33b017322fd7562
48 lines
1.3 KiB
INI
48 lines
1.3 KiB
INI
[tox]
|
|
envlist = linters,docs,py3
|
|
ignore_basepython_conflict = true
|
|
# We skipsdist to force test-requirements and specifically pbr
|
|
# to be installed prior to installing git-review. This ensures that
|
|
# easy_install doesn't try to talk to pypi.org for pbr which fails
|
|
# on older python due to a lack of SNI support.
|
|
skipsdist = true
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
usedevelop = true
|
|
# See "testing behind a proxy" https://review.opendev.org/624496
|
|
passenv =
|
|
http_proxy
|
|
https_proxy
|
|
# avoids potential slip-over of java 1.9 which breaks Gerrit, without it
|
|
# Gerrit may start with incompatible java version.
|
|
JAVA_HOME
|
|
# uncomment to allow custom java options to be added
|
|
# _JAVA_OPTIONS
|
|
TERM
|
|
commands =
|
|
python -m git_review.tests.check_test_id_hashes discover --list
|
|
python -m git_review.tests.prepare
|
|
stestr run --color {posargs}
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:linters]
|
|
commands = flake8
|
|
|
|
[testenv:docs]
|
|
deps =
|
|
-r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/doc/requirements.txt
|
|
commands =
|
|
sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[flake8]
|
|
ignore = E125,H202,H405,H904,W504
|
|
show-source = true
|
|
exclude = .venv,.git,.tox,dist,doc,releasenotes,*lib/python*,*egg,build
|