From 3abb20c22d64faa4aac5a311fbde067d7a642799 Mon Sep 17 00:00:00 2001 From: geisserml Date: Sat, 7 Oct 2023 21:27:49 +0200 Subject: [PATCH] Disable another setup test case FAILED tests_old/test_setup.py::test_get_tag - AssertionError: assert 'macosx_10_9_x86_64' == 'macosx_10_9_universal2' The actual result is correct, the test expectation wrong. sourcebuild tagging was recently fixed not to produce universal2. --- setupsrc/pypdfium2_setup/packaging_base.py | 2 +- tests_old/test_setup.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/setupsrc/pypdfium2_setup/packaging_base.py b/setupsrc/pypdfium2_setup/packaging_base.py index f3afa30fb..2c618ac8d 100644 --- a/setupsrc/pypdfium2_setup/packaging_base.py +++ b/setupsrc/pypdfium2_setup/packaging_base.py @@ -349,7 +349,7 @@ def get_wheel_tag(pl_name): elif pl_name == PlatNames.sourcebuild: # sysconfig.get_platform() may return universal2 on macOS. However, the binaries built here should be considered architecture-specific. # The reason why we don't simply do `if Host.platform: return get_wheel_tag(Host.platform) else ...` is that version info for pdfium-binaries does not have to match the sourcebuild host. - # NOTE On Linux, this just returns f"linux_{arch}" (which is a valid wheel tag). Leave it as-is since we don't know how to determine the build's lowest compatible libc. The caller may re-tag the wheel manually if desired. + # NOTE On Linux, this just returns f"linux_{arch}" (which is a valid wheel tag). Leave it as-is since we don't know the build's lowest compatible libc. The caller may re-tag using the wheel module's CLI. tag = sysconfig.get_platform().replace("-", "_").replace(".", "_") if tag.startswith("macosx") and tag.endswith("universal2"): tag = tag[:-len("universal2")] + Host._machine_name diff --git a/tests_old/test_setup.py b/tests_old/test_setup.py index 89b716c41..eca07afcc 100644 --- a/tests_old/test_setup.py +++ b/tests_old/test_setup.py @@ -58,7 +58,8 @@ def all_platnames(): (PlatNames.windows_x64, "win_amd64"), (PlatNames.windows_arm64, "win_arm64"), (PlatNames.windows_x86, "win32"), - (PlatNames.sourcebuild, sysconfig.get_platform().replace('-','_').replace('.','_')), + # FIXME not sure how to test this + # (PlatNames.sourcebuild, ...), )