Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make a test pass on MacOS Big Sur. #12850

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Licensed under the Apache License, Version 2.0 (see LICENSE).

import os
import shutil
from glob import glob
from textwrap import dedent

Expand Down Expand Up @@ -59,12 +60,18 @@ def dummy() -> int:
)
def test_type_stubs(wheel_glob, import_package, member) -> None:
wheel = glob(f"{os.getcwd()}/{wheel_glob}")[0]
# Pip does not yet support MacOS Big Sur properly: Specifically, it doesn't recognize
# macosx_11_0 as a platform, but will happily consume maxosx_10_16.
# Until all that is figured out, we do some renaming here so that the test passes on Big Sur.
fixed_wheel = wheel.replace("macosx_11_0", "macosx_10_16")
if fixed_wheel != wheel:
shutil.copy(wheel, fixed_wheel)
project = {
"proj1/BUILD": dedent(
f"""\
python_requirement_library(
name="pants",
requirements=["Pants @ file://{wheel}"],
requirements=["Pants @ file://{fixed_wheel}"],
)
python_library()
"""
Expand Down