summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2020-01-13 13:09:33 -0800
committerMatt Clay <matt@mystile.com>2020-01-13 14:31:23 -0800
commit2b57127c64bd0c79462e8fa7a3ccdd9145fc61b9 (patch)
treeca11668536fa407ac085fbca4814369243f63abb
parentdfb425bed5de2a0ca213ad17902f2e13f3a087c3 (diff)
downloadansible-2b57127c64bd0c79462e8fa7a3ccdd9145fc61b9.tar.gz
[stable-2.7] Add test constraint for setuptools. (#66426)
* Add test constraint for setuptools. * Update pip test to work on centos6 container.. (cherry picked from commit 51e5b714e040dd21b1528866d0e13d2672160678) Co-authored-by: Matt Clay <matt@mystile.com>
-rw-r--r--changelogs/fragments/ansible-test-setuptools-constraint.yml2
-rw-r--r--test/integration/targets/pip/tasks/pip.yml6
-rw-r--r--test/runner/requirements/constraints.txt1
3 files changed, 8 insertions, 1 deletions
diff --git a/changelogs/fragments/ansible-test-setuptools-constraint.yml b/changelogs/fragments/ansible-test-setuptools-constraint.yml
new file mode 100644
index 0000000000..8fb0d0551f
--- /dev/null
+++ b/changelogs/fragments/ansible-test-setuptools-constraint.yml
@@ -0,0 +1,2 @@
+bugfixes:
+ - ansible-test no longer tries to install ``setuptools`` 45+ on Python 2.x since those versions are unsupported
diff --git a/test/integration/targets/pip/tasks/pip.yml b/test/integration/targets/pip/tasks/pip.yml
index 2b5a8ac486..791e03dc6b 100644
--- a/test/integration/targets/pip/tasks/pip.yml
+++ b/test/integration/targets/pip/tasks/pip.yml
@@ -510,7 +510,11 @@
- name: install distribute in the virtualenv
pip:
- name: distribute
+ # using -c for constraints is not supported as long as tests are executed using the centos6 container
+ # since the pip version in the venv is not upgraded and is too old (6.0.8)
+ name:
+ - distribute
+ - setuptools<45 # setuptools 45 and later require python 3.5 or later
virtualenv: "{{ output_dir }}/pipenv"
state: present
diff --git a/test/runner/requirements/constraints.txt b/test/runner/requirements/constraints.txt
index eff50cfb32..0116de8389 100644
--- a/test/runner/requirements/constraints.txt
+++ b/test/runner/requirements/constraints.txt
@@ -28,3 +28,4 @@ virtualenv < 16.0.0 ; python_version < '2.7' # virtualenv 16.0.0 and later requi
pyopenssl < 18.0.0 ; python_version < '2.7' # pyOpenSSL 18.0.0 and later require python 2.7 or later
pyfmg == 0.6.1 # newer versions do not pass current unit tests
pycparser < 2.19 ; python_version < '2.7' # pycparser 2.19 and later require python 2.7 or later
+setuptools < 45 ; python_version <= '2.7' # setuptools 45 and later require python 3.5 or later