1+ # Copyright 2025 Broadcom.
12# Copyright 2022-2024 VMware, Inc.
23# SPDX-License-Identifier: Apache-2
34"""
45Verify relenv builds.
56"""
67import os
78import pathlib
9+ import platform
810import shutil
911import subprocess
1012import sys
@@ -331,13 +333,20 @@ def test_pip_install_salt_w_package_requirements(
331333 # assert script.exists()
332334
333335
334- @pytest .mark .parametrize ("pyzmq_version" , ["23.2.0" , "25.1.2" , "26.2.0" ])
336+ @pytest .mark .parametrize (
337+ "pyzmq_version" ,
338+ [
339+ "23.2.0" ,
340+ "25.1.2" ,
341+ "26.2.0" ,
342+ ],
343+ )
335344def test_pip_install_pyzmq (pipexec , pyzmq_version , build_version , arch ):
336345
337346 if pyzmq_version == "23.2.0" and "3.12" in build_version :
338347 pytest .xfail (f"{ pyzmq_version } does not install on 3.12" )
339348
340- if pyzmq_version == "23.2.0" and sys .platform == "darwin" and arch == "arm64" :
349+ if pyzmq_version == "23.2.0" and sys .platform == "darwin" :
341350 pytest .xfail ("pyzmq 23.2.0 fails on macos arm64" )
342351
343352 if sys .platform == "win32" and pyzmq_version == "25.1.2" :
@@ -356,11 +365,22 @@ def test_pip_install_pyzmq(pipexec, pyzmq_version, build_version, arch):
356365 pytest .xfail (f"{ pyzmq_version } does not install on 3.13" )
357366
358367 env = os .environ .copy ()
368+
369+ p = subprocess .run (
370+ [
371+ str (pipexec ),
372+ "install" ,
373+ "--upgrade" ,
374+ "pip" ,
375+ "setuptools" ,
376+ ],
377+ env = env ,
378+ )
379+
380+ env ["ZMQ_PREFIX" ] = "bundled"
381+ if sys .platform == "darwin" and platform .processor () == "arm" :
382+ env ["CFLAGS" ] = "-DCMAKE_OSX_ARCHITECTURES=arm64 -DZMQ_HAVE_CURVE=0"
359383 env ["RELENV_BUILDENV" ] = "yes"
360- env ["USE_STATIC_REQUIREMENTS" ] = "1"
361- env [
362- "CFLAGS"
363- ] = f"{ env .get ('CFLAGS' , '' )} -DCMAKE_OSX_ARCHITECTURES='arm64' -DZMQ_HAVE_CURVE=0"
364384 p = subprocess .run (
365385 [
366386 str (pipexec ),
0 commit comments