File tree Expand file tree Collapse file tree 3 files changed +47
-16
lines changed Expand file tree Collapse file tree 3 files changed +47
-16
lines changed Original file line number Diff line number Diff line change @@ -8,22 +8,21 @@ rm -rf validdist
88mkdir -p validdist
99mv dist/* validdist || true
1010
11- for VERSION in 3.7 3.8 3.9 3.10 ; do
12- PYTHON=/Library/Frameworks/Python.framework/Versions/$VERSION /bin/python3
13- rm -rf build
11+ VERSION= ${VERSION :- 3.10}
12+ PYTHON=/Library/Frameworks/Python.framework/Versions/$VERSION /bin/python3
13+ rm -rf build
1414
15- createvirtualenv $PYTHON releasevenv
16- python -m pip install --upgrade wheel
17- python -m pip install setuptools==63.2.0
18- python setup.py bdist_wheel
19- deactivate || true
20- rm -rf releasevenv
15+ createvirtualenv $PYTHON releasevenv
16+ python -m pip install --upgrade wheel
17+ python -m pip install setuptools==63.2.0
18+ python setup.py bdist_wheel
19+ deactivate || true
20+ rm -rf releasevenv
2121
22- # Test that each wheel is installable.
23- for release in dist/* ; do
24- testinstall $PYTHON $release
25- mv $release validdist/
26- done
22+ # Test that each wheel is installable.
23+ for release in dist/* ; do
24+ testinstall $PYTHON $release
25+ mv $release validdist/
2726done
2827
2928mv validdist/* dist
Original file line number Diff line number Diff line change @@ -891,7 +891,7 @@ functions:
891891 script : |
892892 set -o xtrace
893893 ${PREPARE_SHELL}
894- .evergreen/release.sh
894+ VERSION=${VERSION} ENSURE_UNIVERSAL2=${ENSURE_UNIVERSAL2} .evergreen/release.sh
895895
896896 " upload release " :
897897 - command : archive.targz_pack
@@ -1046,11 +1046,30 @@ tasks:
10461046 genhtml --version || true
10471047 valgrind --version || true
10481048
1049- - name : " release-mac"
1049+ - name : " release-mac-1100"
1050+ tags : ["release_tag"]
1051+ run_on : macos-1100
1052+ commands :
1053+ - func : " build release"
1054+ vars :
1055+ VERSION : " 3.10"
1056+ ENSURE_UNIVERSAL2 : " 1"
1057+ - func : " build release"
1058+ vars :
1059+ VERSION : " 3.9"
1060+ ENSURE_UNIVERSAL2 : " 1"
1061+ - func : " upload release"
1062+
1063+ - name : " release-mac-1014"
10501064 tags : ["release_tag"]
10511065 run_on : macos-1014
10521066 commands :
10531067 - func : " build release"
1068+ vars :
1069+ VERSION : " 3.7"
1070+ - func : " build release"
1071+ vars :
1072+ VERSION : " 3.8"
10541073 - func : " upload release"
10551074
10561075 - name : " release-windows"
Original file line number Diff line number Diff line change 1717Only really intended to be used by internal build scripts.
1818"""
1919
20+ import glob
21+ import os
22+ import subprocess
2023import sys
2124
2225sys .path [0 :0 ] = ["" ]
2629
2730if not pymongo .has_c () or not bson .has_c ():
2831 sys .exit ("could not load C extensions" )
32+
33+ if os .environ .get ("ENSURE_UNIVERSAL2" ) == "1" :
34+ parent_dir = os .path .dirname (pymongo .__path__ [0 ])
35+ for so_file in glob .glob (f"{ parent_dir } /**/*.so" ):
36+ print (f"Checking universal2 compatibility in { so_file } ..." )
37+ output = subprocess .check_output (["file" , so_file ])
38+ if "arm64" not in output .decode ("utf-8" ):
39+ sys .exit ("Universal wheel was not compiled with arm64 support" )
40+ if "x86_64" not in output .decode ("utf-8" ):
41+ sys .exit ("Universal wheel was not compiled with x86_64 support" )
You can’t perform that action at this time.
0 commit comments