Skip to content

Commit b1e9890

Browse files
committed
Simplify pyzmq install test
1 parent 54c8fff commit b1e9890

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

tests/test_verify_build.py

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
# Copyright 2025 Broadcom.
12
# Copyright 2022-2024 VMware, Inc.
23
# SPDX-License-Identifier: Apache-2
34
"""
45
Verify relenv builds.
56
"""
67
import os
78
import pathlib
9+
import platform
810
import shutil
911
import subprocess
1012
import 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+
)
335344
def 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,20 @@ 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"
359381
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"
364382
p = subprocess.run(
365383
[
366384
str(pipexec),

0 commit comments

Comments
 (0)