Skip to content

Commit

Permalink
Disable another setup test case
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mara004 committed Oct 7, 2023
1 parent 0c19ab4 commit 3abb20c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setupsrc/pypdfium2_setup/packaging_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tests_old/test_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...),
)


Expand Down

0 comments on commit 3abb20c

Please sign in to comment.