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

Include -isysroot linker arg on macos #258

Merged
merged 1 commit into from Mar 21, 2018

Conversation

Projects
None yet
3 participants
@frgtn
Copy link
Contributor

frgtn commented Jan 3, 2018

Adds -isysroot linker flag when building extensions on darwin target.
Uses xcrun --show-sdk-path to determine isysroot value.

This is a minimal patch that allows building lxml on MacOS Sierra 10.12.x with XCode 9.

Based on suggestions found in https://forums.developer.apple.com/thread/87829
and addresses https://bugs.launchpad.net/lxml/+bug/1727864

Include -isysroot linker arg on macos
Adds -isysroot linker flag when building extensions on darwin target.
Uses `xcrun --show-sdk-path` to determine isysroot value.

Based on suggestions found in https://forums.developer.apple.com/thread/87829
and addresses https://bugs.launchpad.net/lxml/+bug/1727864
@scoder

This comment has been minimized.

Copy link
Member

scoder commented Jan 13, 2018

Thanks!
What happens if "xcrun" is not installed?
I just want to make sure it doesn't break any other setup.py commands or something like that.

@frgtn

This comment has been minimized.

Copy link
Contributor

frgtn commented Jan 14, 2018

As far as I know xcrun is only available on MacOS when XCode (along with command line utilities) is installed. XCode is needed to build C extensions so if users are able to build extensions they should already have xcrun installed.

Here is a man page for xcrun: https://developer.apple.com/legacy/library/documentation/Darwin/Reference/ManPages/man1/xcrun.1.html

The xcrun command will only be invoked in MacOS (`sys.platform == 'darwin') so it shouldn't cause problems for other platforms.

@kespindler

This comment has been minimized.

Copy link

kespindler commented Mar 14, 2018

I just encountered this issue on my mac, and this PR is what fixed it. Specifically, I had to do:

pip3 install cython
pip3 install git+git://github.com/frgtn/lxml.git@5bfc9f03ffb6458ed579f4166cc9825ed7d46315

Really appreciate the PR!

@scoder scoder merged commit bbcea38 into lxml:master Mar 21, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kespindler

This comment has been minimized.

Copy link

kespindler commented Mar 21, 2018

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment