Skip to content

Commit a949142

Browse files
authored
PYTHON-2816 Generate pip < 20.3 compatible manylinux wheels (mongodb#679)
Split old/new manylinux wheel generation into two tasks.
1 parent 775bf92 commit a949142

File tree

3 files changed

+63
-26
lines changed

3 files changed

+63
-26
lines changed

.evergreen/build-manylinux-internal.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ for PYTHON in /opt/python/*/bin/python; do
1919
$PYTHON setup.py bdist_wheel
2020
rm -rf build
2121

22-
# Audit wheels and write multilinux tag
22+
# Audit wheels and write manylinux tag
2323
for whl in dist/*.whl; do
24-
# Skip already built manylinux1 wheels.
24+
# Skip already built manylinux wheels.
2525
if [[ "$whl" != *"manylinux"* ]]; then
2626
auditwheel repair $whl -w dist
2727
rm $whl

.evergreen/build-manylinux.sh

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,29 @@
11
#!/bin/bash -ex
22

33
docker version
4-
5-
images=(quay.io/pypa/manylinux1_x86_64 \
6-
quay.io/pypa/manylinux1_i686 \
7-
quay.io/pypa/manylinux2014_x86_64 \
8-
quay.io/pypa/manylinux2014_i686 \
9-
quay.io/pypa/manylinux2014_aarch64 \
10-
quay.io/pypa/manylinux2014_ppc64le \
11-
quay.io/pypa/manylinux2014_s390x)
4+
# manylinux1 2021-05-05-b64d921 and manylinux2014 2021-05-05-1ac6ef3 were
5+
# the last releases to generate pip < 20.3 compatible wheels. After that
6+
# auditwheel was upgraded to v4 which produces PEP 600 manylinux_x_y wheels
7+
# which requires pip >= 20.3. We use the older docker image to support older
8+
# pip versions.
9+
BUILD_WITH_TAG="$1"
10+
if [ -n "$BUILD_WITH_TAG" ]; then
11+
images=(quay.io/pypa/manylinux1_x86_64:2021-05-05-b64d921 \
12+
quay.io/pypa/manylinux1_i686:2021-05-05-b64d921 \
13+
quay.io/pypa/manylinux2014_x86_64:2021-05-05-1ac6ef3 \
14+
quay.io/pypa/manylinux2014_i686:2021-05-05-1ac6ef3 \
15+
quay.io/pypa/manylinux2014_aarch64:2021-05-05-1ac6ef3 \
16+
quay.io/pypa/manylinux2014_ppc64le:2021-05-05-1ac6ef3 \
17+
quay.io/pypa/manylinux2014_s390x:2021-05-05-1ac6ef3)
18+
else
19+
images=(quay.io/pypa/manylinux1_x86_64 \
20+
quay.io/pypa/manylinux1_i686 \
21+
quay.io/pypa/manylinux2014_x86_64 \
22+
quay.io/pypa/manylinux2014_i686 \
23+
quay.io/pypa/manylinux2014_aarch64 \
24+
quay.io/pypa/manylinux2014_ppc64le \
25+
quay.io/pypa/manylinux2014_s390x)
26+
fi
1227

1328
for image in "${images[@]}"; do
1429
docker pull $image

.evergreen/config.yml

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,24 @@ functions:
823823
# Remove all Docker images
824824
docker rmi -f $(docker images -a -q) &> /dev/null || true
825825
826+
"upload release":
827+
- command: archive.targz_pack
828+
params:
829+
target: "release-files.tgz"
830+
source_dir: "src/dist"
831+
include:
832+
- "*"
833+
- command: s3.put
834+
params:
835+
aws_key: ${aws_key}
836+
aws_secret: ${aws_secret}
837+
local_file: release-files.tgz
838+
remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/release/${task_id}-${execution}-release-files.tar.gz
839+
bucket: mciuploads
840+
permissions: public-read
841+
content_type: ${content_type|application/gzip}
842+
display_name: Release files
843+
826844
pre:
827845
- func: "fetch source"
828846
- func: "prepare resources"
@@ -906,7 +924,6 @@ tasks:
906924
genhtml --version || true
907925
valgrind --version || true
908926
909-
910927
- name: "release"
911928
tags: ["release"]
912929
exec_timeout_secs: 216000 # 60 minutes (manylinux task is slow).
@@ -919,22 +936,21 @@ tasks:
919936
set -o xtrace
920937
${PREPARE_SHELL}
921938
.evergreen/release.sh
922-
- command: archive.targz_pack
923-
params:
924-
target: "release-files.tgz"
925-
source_dir: "src/dist"
926-
include:
927-
- "*"
928-
- command: s3.put
939+
- func: "upload release"
940+
941+
- name: "release-old-manylinux"
942+
tags: ["release"]
943+
exec_timeout_secs: 216000 # 60 minutes (manylinux task is slow).
944+
commands:
945+
- command: shell.exec
946+
type: test
929947
params:
930-
aws_key: ${aws_key}
931-
aws_secret: ${aws_secret}
932-
local_file: release-files.tgz
933-
remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/release/${task_id}-${execution}-release-files.tar.gz
934-
bucket: mciuploads
935-
permissions: public-read
936-
content_type: ${content_type|application/gzip}
937-
display_name: Release files
948+
working_dir: "src"
949+
script: |
950+
set -o xtrace
951+
${PREPARE_SHELL}
952+
.evergreen/build-manylinux.sh BUILD_WITH_TAG
953+
- func: "upload release"
938954

939955
# Standard test tasks {{{
940956

@@ -2633,6 +2649,12 @@ buildvariants:
26332649
batchtime: 20160 # 14 days
26342650
tasks:
26352651
- name: "release"
2652+
rules:
2653+
- if:
2654+
platform: ubuntu-20.04
2655+
then:
2656+
add_tasks:
2657+
- name: "release-old-manylinux"
26362658

26372659
# Platform notes
26382660
# i386 builds of OpenSSL or Cyrus SASL are not available

0 commit comments

Comments
 (0)