Skip to content

Commit c907b38

Browse files
authored
PYTHON-2908 Work around Jython package install problems (#733)
1 parent d8e3864 commit c907b38

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.evergreen/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2547,7 +2547,7 @@ buildvariants:
25472547
exclude_spec:
25482548
# Python 3.4 doesn't support OpenSSL 1.1.0+ so won't build on Debian 9+.
25492549
- platform: debian92
2550-
python-version: ["3.4"]
2550+
python-version: ["3.4", "jython2.7"]
25512551
auth-ssl: "auth-ssl"
25522552
display_name: "${python-version} OpenSSL 1.1.0 ${platform} ${auth-ssl}"
25532553
tasks:

.evergreen/run-atlas-tests.sh

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ set -o xtrace
66

77
export JAVA_HOME=/opt/java/jdk8
88

9+
# Attempt to find system pip before creating a virtualenv
10+
PIP=$(command -v pip2 || command -v pip)
11+
912
if [ -z "$PYTHON_BINARY" ]; then
1013
echo "No python binary specified"
1114
PYTHON_BINARY=$(command -v python || command -v python3) || true
@@ -28,8 +31,12 @@ else
2831
fi
2932
trap "deactivate; rm -rf atlastest" EXIT HUP
3033

31-
if [ $IMPL = "Jython" -o $IMPL = "PyPy" ]; then
32-
echo "Using Jython or PyPy"
34+
if [ $IMPL = "Jython" ]; then
35+
echo "Using Jython"
36+
$PIP download certifi
37+
python -m pip install --no-index -f file://$(pwd) certifi
38+
elif [ $IMPL = "PyPy" ]; then
39+
echo "Using PyPy"
3340
python -m pip install certifi
3441
else
3542
IS_PRE_279=$(python -c "import sys; sys.stdout.write('1' if sys.version_info < (2, 7, 9) else '0')")

0 commit comments

Comments
 (0)