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

Ignore patching Mach-O files if not running on macOS #3912

Merged
merged 2 commits into from
Mar 27, 2020
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion conda_build/post.py
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,9 @@ def osx_ch_link(path, link_dict, host_prefix, build_prefix, files):


def mk_relative_osx(path, host_prefix, build_prefix, files, rpaths=('lib',)):
assert sys.platform == 'darwin'
if sys.platform != 'darwin':
log.warn("Found Mach-O file but patching is only supported on macOS, skipping: %s", path)
return
Copy link

Choose a reason for hiding this comment

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

Is it a standard style (2 blank space indents) here in conda-build? I saw 4 space indents in many other codes of the code base.

Copy link
Member

Choose a reason for hiding this comment

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

It should be 4 spaces. Can you please send a PR to fix it?

Copy link
Contributor

Choose a reason for hiding this comment

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

PR #3925 adjusts the indentation and fixes another bug introduced here.

Copy link

Choose a reason for hiding this comment

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

Thank you!

prefix = build_prefix if exists(build_prefix) else host_prefix
names = macho.otool(path, prefix)
s = macho.install_name_change(path, prefix,
Expand Down
25 changes: 25 additions & 0 deletions news/dont-fix-macho-files-on-other-platforms.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Enhancements:
-------------

* <news item>

Bug fixes:
----------

* Show a warning instead of failing if a Mach-O file is prouduced by a build running on a platform other than macOS.

Deprecations:
-------------

* <news item>

Docs:
-----

* <news item>

Other:
------

* <news item>