PYTHON-3639 Release Build is Failing to Create Universal Wheels for MacOS (#1174)
This commit is contained in:
parent
880f3dd8ea
commit
1d052cb706
@ -32,10 +32,11 @@ if not pymongo.has_c() or not bson.has_c():
|
||||
|
||||
if os.environ.get("ENSURE_UNIVERSAL2") == "1":
|
||||
parent_dir = os.path.dirname(pymongo.__path__[0])
|
||||
for so_file in glob.glob(f"{parent_dir}/**/*.so"):
|
||||
print(f"Checking universal2 compatibility in {so_file}...")
|
||||
output = subprocess.check_output(["file", so_file])
|
||||
if "arm64" not in output.decode("utf-8"):
|
||||
sys.exit("Universal wheel was not compiled with arm64 support")
|
||||
if "x86_64" not in output.decode("utf-8"):
|
||||
sys.exit("Universal wheel was not compiled with x86_64 support")
|
||||
for pkg in ["pymongo", "bson", "grifs"]:
|
||||
for so_file in glob.glob(f"{parent_dir}/{pkg}/*.so"):
|
||||
print(f"Checking universal2 compatibility in {so_file}...")
|
||||
output = subprocess.check_output(["file", so_file])
|
||||
if "arm64" not in output.decode("utf-8"):
|
||||
sys.exit("Universal wheel was not compiled with arm64 support")
|
||||
if "x86_64" not in output.decode("utf-8"):
|
||||
sys.exit("Universal wheel was not compiled with x86_64 support")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user