Skip to content

bpo-45258: search for -isysroot in addition to --sysroot #28501

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

Closed
wants to merge 2 commits into from

Conversation

isuruf
Copy link
Contributor

@isuruf isuruf commented Sep 21, 2021

-isysroot is for macOS, while --sysroot is for gcc/linux

https://bugs.python.org/issue45258

-isysroot is for macOS, while --sysroot is for gcc/linux
@ned-deily ned-deily requested a review from a team September 22, 2021 02:06
@ned-deily
Copy link
Member

Is this change really needed? That code path seems to be only used in the cross-compiling case which we don't really support for macOS. And we already handle SDK paths for macOS builds in another way: see is_macosx_sdk_path().

@isuruf
Copy link
Contributor Author

isuruf commented Sep 22, 2021

Hi @ned-deily. Thanks for the review.

That code path seems to be only used in the cross-compiling case which we don't really support for macOS.

Sure, but there are 2 use cases I have in packaging python for conda-forge.

  1. Building natively but setting _PYTHON_HOST_PLATFORM. This would make setup.py think it's cross compiling and not look for any files under /usr or /usr/local. This is useful for making sure all the dependencies come from conda-forge.
  2. Cross compiling for macos-arm64 from macos-x86_64 as in gh-86642: Allow cross compiling on darwin #23523

@github-actions
Copy link

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Oct 23, 2021
@FFY00
Copy link
Member

FFY00 commented Oct 23, 2021

@ronaldoussoren would you be able to take a look at this?

@github-actions github-actions bot removed the stale Stale PR or inactive for long period of time. label Oct 24, 2021
Copy link
Contributor

@MaxwellDupre MaxwellDupre left a comment

Choose a reason for hiding this comment

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

Minimal change.

@ronaldoussoren
Copy link
Contributor

That PR is no longer relevant for "main" as setup.py has been removed there.

@ronaldoussoren
Copy link
Contributor

Hi @ned-deily. Thanks for the review.

That code path seems to be only used in the cross-compiling case which we don't really support for macOS.

Sure, but there are 2 use cases I have in packaging python for conda-forge.

  1. Building natively but setting _PYTHON_HOST_PLATFORM. This would make setup.py think it's cross compiling and not look for any files under /usr or /usr/local. This is useful for making sure all the dependencies come from conda-forge.

This seems to rely on an implementation detail in the build system, and is IMHO not something we should actively support in this way. If this is useful it should be an explicit configure option.

  1. Cross compiling for macos-arm64 from macos-x86_64 as in bpo-42476: Allow cross compiling on darwin #23523

@encukou
Copy link
Member

encukou commented Mar 28, 2024

setup.py is no more, so I'll close this PR.

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.

9 participants