summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClark Boylan <clark.boylan@gmail.com>2021-04-20 15:44:43 -0700
committerClark Boylan <clark.boylan@gmail.com>2021-04-23 10:42:35 -0700
commitef1a35f4e19c0460c27c9e0577e8e41d7dd52b0b (patch)
tree66f72fcef8af8e6fb11b0dd898298b5107770eff
parent18189abf59723b8f754b6e0fea72e9de18d2067f (diff)
downloadgit-review-ef1a35f4e19c0460c27c9e0577e8e41d7dd52b0b.tar.gz
Install PBR explicitly
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
-rw-r--r--test-requirements.txt4
-rw-r--r--tox.ini6
2 files changed, 10 insertions, 0 deletions
diff --git a/test-requirements.txt b/test-requirements.txt
index ad03fc1..c175511 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -1,3 +1,7 @@
+# This is listed in order to preinstall PBR with pip as easy_install
+# on these older python versions can no longer reliably talk to pypi
+# due to non SNI TLS connections being disabled.
+pbr ; python_version >= "3" and python_version <= "3.5"
hacking>=2.0.0,<2.1.0
mock
fixtures>=0.3.14
diff --git a/tox.ini b/tox.ini
index 0152d7b..66148bc 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,9 +1,15 @@
[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