diff options
author | Patrick Cloke <clokep@users.noreply.github.com> | 2021-01-25 14:22:35 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-25 14:22:35 -0500 |
commit | a71be9d62d0a8670f088ee4879ab5e72869dd9b1 (patch) | |
tree | b9cdc59d71a411d540fd39d2d25bd45002608c9f | |
parent | Merge tag 'v1.26.0rc2' into develop (diff) | |
download | synapse-a71be9d62d0a8670f088ee4879ab5e72869dd9b1.tar.xz |
Fix Python 3.5 old deps build by using a compatible pip version. (#9217)
Co-authored-by: Dan Callahan <danc@element.io> pip 21.0 stopped supporting Python 3.5.
-rwxr-xr-x | .buildkite/scripts/test_old_deps.sh | 3 | ||||
-rw-r--r-- | changelog.d/9217.misc | 1 | ||||
-rw-r--r-- | tox.ini | 15 |
3 files changed, 11 insertions, 8 deletions
diff --git a/.buildkite/scripts/test_old_deps.sh b/.buildkite/scripts/test_old_deps.sh index 9905c4bc4f..28e6694b5d 100755 --- a/.buildkite/scripts/test_old_deps.sh +++ b/.buildkite/scripts/test_old_deps.sh @@ -10,4 +10,7 @@ apt-get install -y python3.5 python3.5-dev python3-pip libxml2-dev libxslt-dev x export LANG="C.UTF-8" +# Prevent virtualenv from auto-updating pip to an incompatible version +export VIRTUALENV_NO_DOWNLOAD=1 + exec tox -e py35-old,combine diff --git a/changelog.d/9217.misc b/changelog.d/9217.misc new file mode 100644 index 0000000000..72bacc7110 --- /dev/null +++ b/changelog.d/9217.misc @@ -0,0 +1 @@ +Fix the Python 3.5 old dependencies build. diff --git a/tox.ini b/tox.ini index 95841e03f0..9ff70fe312 100644 --- a/tox.ini +++ b/tox.ini @@ -18,11 +18,13 @@ deps = # installed on that). # # anyway, make sure that we have a recent enough setuptools. - setuptools>=18.5 + setuptools>=18.5 ; python_version >= '3.6' + setuptools>=18.5,<51.0.0 ; python_version < '3.6' # we also need a semi-recent version of pip, because old ones fail to # install the "enum34" dependency of cryptography. - pip>=10 + pip>=10 ; python_version >= '3.6' + pip>=10,<21.0 ; python_version < '3.6' # directories/files we run the linters on. # if you update this list, make sure to do the same in scripts-dev/lint.sh @@ -104,15 +106,10 @@ usedevelop=true [testenv:py35-old] skip_install=True deps = - # Ensure a version of setuptools that supports Python 3.5 is installed. - setuptools < 51.0.0 - # Old automat version for Twisted Automat == 0.3.0 - lxml - coverage - coverage-enable-subprocess==1.0 + {[base]deps} commands = # Make all greater-thans equals so we test the oldest version of our direct @@ -169,6 +166,8 @@ commands = {toxinidir}/scripts-dev/generate_sample_config --check skip_install = True deps = coverage + pip>=10 ; python_version >= '3.6' + pip>=10,<21.0 ; python_version < '3.6' commands= coverage combine coverage report |