-
Notifications
You must be signed in to change notification settings - Fork 1.1k
PYTHON-1631 Automate release wheels for Windows and manylinux #473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6b7e1e7
d2406be
db3c3ea
69a82b7
cac08d4
06c0ff1
27e425c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
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 |
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 \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do all versions other than 3.4 get built twice? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. They get built first with these old images and then rebuilt and overwritten with the latest manylinux1_x86_64/manylinux1_i686 images. |
||
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 |
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 |
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you adding this now since we can't actually do it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can still use it to build macos wheels manually.