-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PYTHON-1631 Automate release wheels for Windows and manylinux (#473)
- Loading branch information
1 parent
b04e334
commit c92150d
Showing
6 changed files
with
149 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash -ex | ||
|
||
for VERSION in 2.7 3.4 3.5 3.6 3.7 3.8; do | ||
if [[ $VERSION == "2.7" ]]; then | ||
rm -rf build | ||
python$VERSION setup.py bdist_egg | ||
fi | ||
rm -rf build | ||
python$VERSION setup.py bdist_wheel | ||
done | ||
|
||
ls dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash -ex | ||
cd /pymongo | ||
|
||
# Compile wheels | ||
for PYBIN in /opt/python/*/bin; do | ||
# Skip Python 3.3 and 3.9. | ||
if [[ "$PYBIN" == *"cp33"* || "$PYBIN" == *"cp39"* ]]; then | ||
continue | ||
fi | ||
# https://github.com/pypa/manylinux/issues/49 | ||
rm -rf build | ||
${PYBIN}/python setup.py bdist_wheel | ||
done | ||
|
||
# https://github.com/pypa/manylinux/issues/49 | ||
rm -rf build | ||
|
||
# Audit wheels and write multilinux1 tag | ||
for whl in dist/*.whl; do | ||
# Skip already built manylinux1 wheels. | ||
if [[ "$whl" != *"manylinux"* ]]; then | ||
auditwheel repair $whl -w dist | ||
rm $whl | ||
fi | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/bash -ex | ||
|
||
docker version | ||
|
||
# 2020-03-20-2fda31c Was the last release to include Python 3.4. | ||
images=(quay.io/pypa/manylinux1_x86_64:2020-03-20-2fda31c \ | ||
quay.io/pypa/manylinux1_i686:2020-03-20-2fda31c \ | ||
quay.io/pypa/manylinux1_x86_64 \ | ||
quay.io/pypa/manylinux1_i686 \ | ||
quay.io/pypa/manylinux2014_x86_64 \ | ||
quay.io/pypa/manylinux2014_i686) | ||
# aarch64/ppc64le/s390x work on macOS locally but not on linux in evergreen: | ||
# [2020/07/23 00:24:00.482] + docker run --rm -v /data/mci/cd100cec6341abda533450fb3f2fab99/src:/pymongo quay.io/pypa/manylinux2014_aarch64 /pymongo/.evergreen/build-manylinux-internal.sh | ||
# [2020/07/23 00:24:01.186] standard_init_linux.go:211: exec user process caused "exec format error" | ||
# | ||
# Could be related to: | ||
# https://github.com/pypa/manylinux/issues/410 | ||
# quay.io/pypa/manylinux2014_aarch64 \ | ||
# quay.io/pypa/manylinux2014_ppc64le \ | ||
# quay.io/pypa/manylinux2014_s390x) | ||
|
||
for image in "${images[@]}"; do | ||
docker pull $image | ||
docker run --rm -v `pwd`:/pymongo $image /pymongo/.evergreen/build-manylinux-internal.sh | ||
done | ||
|
||
ls dist | ||
|
||
# Check for any unexpected files. | ||
unexpected=$(find dist \! \( -iname dist -or \ | ||
-iname '*cp27*' -or \ | ||
-iname '*cp34*' -or \ | ||
-iname '*cp35*' -or \ | ||
-iname '*cp36*' -or \ | ||
-iname '*cp37*' -or \ | ||
-iname '*cp38*' \)) | ||
if [ -n "$unexpected" ]; then | ||
echo "Unexpected files:" $unexpected | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/bash -ex | ||
|
||
for VERSION in 27 34 35 36 37 38; do | ||
PYTHON=C:/Python/Python${VERSION}/python.exe | ||
PYTHON32=C:/Python/32/Python${VERSION}/python.exe | ||
if [[ $VERSION == "2.7" ]]; then | ||
rm -rf build | ||
$PYTHON setup.py bdist_egg | ||
rm -rf build | ||
$PYTHON32 setup.py bdist_egg | ||
fi | ||
rm -rf build | ||
$PYTHON setup.py bdist_wheel | ||
rm -rf build | ||
$PYTHON32 setup.py bdist_wheel | ||
done | ||
|
||
ls dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash -ex | ||
|
||
if [ $(uname -s) = "Darwin" ]; then | ||
.evergreen/build-mac.sh | ||
elif [ "Windows_NT" = "$OS" ]; then # Magic variable in cygwin | ||
.evergreen/build-windows.sh | ||
else | ||
.evergreen/build-manylinux.sh | ||
fi |