Skip to content

Commit 94a78fd

Browse files
committed
PYTHON-2816 Generate pip < 20.3 compatible manylinux wheels (#679)
Split old/new manylinux wheel generation into two tasks. (cherry picked from commit a949142)
1 parent cd033e7 commit 94a78fd

File tree

3 files changed

+66
-28
lines changed

3 files changed

+66
-28
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: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,32 @@
22

33
docker version
44

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

1632
for image in "${images[@]}"; do
1733
docker pull $image

.evergreen/config.yml

Lines changed: 38 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,24 @@ functions:
833833
# Remove all Docker images
834834
docker rmi -f $(docker images -a -q) &> /dev/null || true
835835
836+
"upload release":
837+
- command: archive.targz_pack
838+
params:
839+
target: "release-files.tgz"
840+
source_dir: "src/dist"
841+
include:
842+
- "*"
843+
- command: s3.put
844+
params:
845+
aws_key: ${aws_key}
846+
aws_secret: ${aws_secret}
847+
local_file: release-files.tgz
848+
remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/release/${task_id}-${execution}-release-files.tar.gz
849+
bucket: mciuploads
850+
permissions: public-read
851+
content_type: ${content_type|application/gzip}
852+
display_name: Release files
853+
836854
pre:
837855
- func: "fetch source"
838856
- func: "prepare resources"
@@ -917,7 +935,6 @@ tasks:
917935
genhtml --version || true
918936
valgrind --version || true
919937
920-
921938
- name: "release"
922939
tags: ["release"]
923940
exec_timeout_secs: 216000 # 60 minutes (manylinux task is slow).
@@ -930,22 +947,21 @@ tasks:
930947
set -o xtrace
931948
${PREPARE_SHELL}
932949
.evergreen/release.sh
933-
- command: archive.targz_pack
934-
params:
935-
target: "release-files.tgz"
936-
source_dir: "src/dist"
937-
include:
938-
- "*"
939-
- command: s3.put
950+
- func: "upload release"
951+
952+
- name: "release-old-manylinux"
953+
tags: ["release"]
954+
exec_timeout_secs: 216000 # 60 minutes (manylinux task is slow).
955+
commands:
956+
- command: shell.exec
957+
type: test
940958
params:
941-
aws_key: ${aws_key}
942-
aws_secret: ${aws_secret}
943-
local_file: release-files.tgz
944-
remote_file: ${UPLOAD_BUCKET}/${build_variant}/${revision}/${version_id}/${build_id}/release/${task_id}-${execution}-release-files.tar.gz
945-
bucket: mciuploads
946-
permissions: public-read
947-
content_type: ${content_type|application/gzip}
948-
display_name: Release files
959+
working_dir: "src"
960+
script: |
961+
set -o xtrace
962+
${PREPARE_SHELL}
963+
.evergreen/build-manylinux.sh BUILD_WITH_TAG
964+
- func: "upload release"
949965

950966
# Standard test tasks {{{
951967

@@ -2825,6 +2841,12 @@ buildvariants:
28252841
batchtime: 20160 # 14 days
28262842
tasks:
28272843
- name: "release"
2844+
rules:
2845+
- if:
2846+
platform: ubuntu-20.04
2847+
then:
2848+
add_tasks:
2849+
- name: "release-old-manylinux"
28282850

28292851
# Platform notes
28302852
# i386 builds of OpenSSL or Cyrus SASL are not available

0 commit comments

Comments
 (0)