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
8
8
mkdir -p validdist
9
9
mv dist/* validdist || true
10
10
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
14
14
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
21
21
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/
27
26
done
28
27
29
28
mv validdist/* dist
Original file line number Diff line number Diff line change @@ -891,7 +891,7 @@ functions:
891
891
script : |
892
892
set -o xtrace
893
893
${PREPARE_SHELL}
894
- .evergreen/release.sh
894
+ VERSION=${VERSION} ENSURE_UNIVERSAL2=${ENSURE_UNIVERSAL2} .evergreen/release.sh
895
895
896
896
" upload release " :
897
897
- command : archive.targz_pack
@@ -1046,11 +1046,30 @@ tasks:
1046
1046
genhtml --version || true
1047
1047
valgrind --version || true
1048
1048
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"
1050
1064
tags : ["release_tag"]
1051
1065
run_on : macos-1014
1052
1066
commands :
1053
1067
- func : " build release"
1068
+ vars :
1069
+ VERSION : " 3.7"
1070
+ - func : " build release"
1071
+ vars :
1072
+ VERSION : " 3.8"
1054
1073
- func : " upload release"
1055
1074
1056
1075
- name : " release-windows"
Original file line number Diff line number Diff line change 17
17
Only really intended to be used by internal build scripts.
18
18
"""
19
19
20
+ import glob
21
+ import os
22
+ import subprocess
20
23
import sys
21
24
22
25
sys .path [0 :0 ] = ["" ]
26
29
27
30
if not pymongo .has_c () or not bson .has_c ():
28
31
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