summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Zambory <jeff.zambory@mongodb.com>2022-10-03 21:02:34 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-03 21:38:54 +0000
commitb3567ac0fb737eac80473a2e89bb9e499e8dcd60 (patch)
tree78b517dcc36e1dfc9cf945cf147500dcb1ca3f71
parent5a2aacc3b7ef54b106da4c8365ed8dd0b2e28690 (diff)
downloadmongo-b3567ac0fb737eac80473a2e89bb9e499e8dcd60.tar.gz
SERVER-69569: Python scripts failing in Evergreen tasks
-rw-r--r--etc/evergreen.yml17
-rw-r--r--etc/pip/components/jiraclient.req3
-rw-r--r--etc/pip/components/platform.req3
3 files changed, 21 insertions, 2 deletions
diff --git a/etc/evergreen.yml b/etc/evergreen.yml
index a64c0591af3..17d90614fa2 100644
--- a/etc/evergreen.yml
+++ b/etc/evergreen.yml
@@ -1071,7 +1071,22 @@ functions:
# Windows path separator
toolchain_txt="$pip_dir/toolchain-requirements.txt"
${activate_virtualenv}
- python -m pip install -r "$toolchain_txt"
+ pip_resolver=""
+
+ # Upgrade pip only on x86_64 systems. The upgraded pip is incompatible
+ # with older versions of setuptools, including those available on
+ # s390x, and arm64. See SERVER-53250
+ uname_arch=$(uname -m || echo "unknown")
+ if [[ "$uname_arch" == "x86_64" ]]; then
+ echo "Upgrading pip to 20.3.1"
+ python -m pip install "pip==20.3.1"
+ # this flag is only supported on the 20.x versions of pip.
+ pip_resolver="--use-deprecated=legacy-resolver"
+ echo "Upgraded pip to 20.3.1, using legacy resolver"
+ else
+ echo "Skipping pip upgrade, architecture was: $uname_arch"
+ fi
+ python -m pip install $pip_resolver -r "$toolchain_txt" -q
"send benchmark results":
command: json.send
diff --git a/etc/pip/components/jiraclient.req b/etc/pip/components/jiraclient.req
index 1e18fadee5c..3852dae4773 100644
--- a/etc/pip/components/jiraclient.req
+++ b/etc/pip/components/jiraclient.req
@@ -2,5 +2,6 @@
jira <= 3.1.1
requests-oauth <= 0.4.1
PyJWT <= 2.3.0 # https://github.com/pycontribs/jira/issues/247
-cryptography == 2.3 # Needed for oauthlib to use RSAAlgorithm # Version locked - see SERVER-36618
+cryptography == 2.3; platform_machine == "s390x" or platform_machine == "ppc64le" # Needed for oauthlib to use RSAAlgorithm # Version locked - see SERVER-36618
+cryptography == 36.0.2; platform_machine != "s390x" and platform_machine != "ppc64le"
# We are omitting pycrypto based on https://github.com/pycontribs/jira/pull/629
diff --git a/etc/pip/components/platform.req b/etc/pip/components/platform.req
index c5b73def69b..d9c5b1a91fd 100644
--- a/etc/pip/components/platform.req
+++ b/etc/pip/components/platform.req
@@ -1,3 +1,6 @@
# Platform-specific components
pypiwin32==223; sys_platform == "win32" and python_version > "3"
pywin32==225; sys_platform == "win32" and python_version > "3"
+
+cryptography == 2.3; platform_machine == "s390x" or platform_machine == "ppc64le" # Needed for oauthlib to use RSAAlgorithm # Version locked - see SERVER-36618
+cryptography == 36.0.2; platform_machine != "s390x" and platform_machine != "ppc64le" \ No newline at end of file