Skip to content

Commit

Permalink
Add test constraint for setuptools. (ansible#66426)
Browse files Browse the repository at this point in the history
* Add test constraint for setuptools.

* Update pip test to work on centos6 container.
  • Loading branch information
mattclay authored and NehaKembalkarA10 committed Jan 24, 2020
1 parent f415bc0 commit cc04a67
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 2 deletions.
2 changes: 2 additions & 0 deletions 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
@@ -0,0 +1 @@
setuptools < 45 ; python_version <= '2.7' # setuptools 45 and later require python 3.5 or later
Expand Up @@ -9,7 +9,7 @@ fi
set -eux

source virtualenv.sh
pip install openshift
pip install openshift -c constraints.txt

./server.py &

Expand Down
6 changes: 5 additions & 1 deletion test/integration/targets/pip/tasks/pip.yml
Expand Up @@ -496,7 +496,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

Expand Down
1 change: 1 addition & 0 deletions test/lib/ansible_test/_data/requirements/constraints.txt
Expand Up @@ -37,6 +37,7 @@ lxml < 4.3.0 ; python_version < '2.7' # lxml 4.3.0 and later require python 2.7
pyvmomi < 6.0.0 ; python_version < '2.7' # pyvmomi 6.0.0 and later require python 2.7 or later
pyone == 1.1.9 # newer versions do not pass current integration tests
botocore >= 1.10.0 # adds support for the following AWS services: secretsmanager, fms, and acm-pca
setuptools < 45 ; python_version <= '2.7' # setuptools 45 and later require python 3.5 or later

# freeze pylint and its requirements for consistent test results
astroid == 2.2.5
Expand Down

0 comments on commit cc04a67

Please sign in to comment.