Skip to content

[Build] Override MACOSX_DEPLOYMENT_TARGET for gRPC Python - #37997

Closed
veblush wants to merge 2 commits into
grpc:masterfrom
veblush:python-osx
Closed

veblush wants to merge 2 commits into
grpc:masterfrom
veblush:python-osx

Conversation

@veblush

@veblush veblush commented Oct 24, 2024 •

Copy link
Copy Markdown
Contributor

CPython uses this logic to determine MACOSX_DEPLOYMENT_TARGET and the lowest possible value is 10.9 (Mavericks) as of today. But we need to use at least 10.14 (Mojave) to get prepared for upcoming C++17 upgrade (scheduled in 2024-11). This 10.14 version should be safe to use as i) Apple stopped supporting any versions older than 12.0 (https://endoflife.date/macos) and ii) this version is older than officially support OSX version (11.0) of gRPC Core/C++ (https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md)

@veblush veblush added lang/Python area/build release notes: yes Indicates if PR needs to be in release notes labels Oct 24, 2024
@veblush
veblush requested a review from gnossen October 24, 2024 22:52
@veblush
veblush marked this pull request as ready for review October 24, 2024 22:52
@veblush
veblush requested a review from XuanWang-Amos October 24, 2024 23:00
@XuanWang-Amos

Copy link
Copy Markdown
Contributor

Change looks fine to me, @gnossen is there an official list of supported macOS versions for Python?

@gnossen

gnossen commented Oct 29, 2024

Copy link
Copy Markdown
Contributor

is there an official list of supported macOS versions for Python?

There isn't, though we probably should have one.

Regardless, this change looks reasonable, given that our new floor will be a six year old Mac OS release.

@gnossen

gnossen commented Oct 29, 2024

Copy link
Copy Markdown
Contributor

@sourabhsinghs @sreenithi FYI, this will change the artifacts for the next release.

Comment thread setup.py
# version Python was built on. You can further customize the target macOS
# version by setting the MACOSX_DEPLOYMENT_TARGET environment variable before
# running setup.py.
if sys.platform == "darwin":

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we also need this here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh good catch. I added this to grpcio_observability/setup.py too

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need it since observability only support Linux for now, but it's fine to add it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh that's why I didn't see errors from grpcio_observability build. Thanks for the info.

eugeneo pushed a commit to eugeneo/grpc that referenced this pull request Nov 6, 2024
CPython uses this [logic](https://github.com/pypa/cibuildwheel/blob/b98602705f5449b8e221a1849a8dc18e8d8b14db/cibuildwheel/macos.py#L302-L323) to determine `MACOSX_DEPLOYMENT_TARGET` and the lowest possible value is `10.9` (Mavericks) as of today. But we need to use at least `10.14` (Mojave) to get prepared for upcoming C++17 upgrade (scheduled in 2024-11). This `10.14` version should be safe to use as i) Apple stopped supporting any versions older than 12.0 (https://endoflife.date/macos) and ii) this version is older than officially support OSX version (11.0) of gRPC Core/C++ (https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md)

Closes grpc#37997

PiperOrigin-RevId: 691535457
paulosjca pushed a commit to paulosjca/grpc that referenced this pull request Nov 25, 2024
CPython uses this [logic](https://github.com/pypa/cibuildwheel/blob/b98602705f5449b8e221a1849a8dc18e8d8b14db/cibuildwheel/macos.py#L302-L323) to determine `MACOSX_DEPLOYMENT_TARGET` and the lowest possible value is `10.9` (Mavericks) as of today. But we need to use at least `10.14` (Mojave) to get prepared for upcoming C++17 upgrade (scheduled in 2024-11). This `10.14` version should be safe to use as i) Apple stopped supporting any versions older than 12.0 (https://endoflife.date/macos) and ii) this version is older than officially support OSX version (11.0) of gRPC Core/C++ (https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md)

Closes grpc#37997

PiperOrigin-RevId: 691535457
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants