Fix linking problem on macos (#18564)

This commit is contained in:
Garth N. Wells 2020-09-09 03:01:21 +01:00 committed by GitHub
parent 520308ad2b
commit af189e3ed9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -219,3 +219,9 @@ def install(self, spec, prefix):
Executable(join_path(prefix.bin, 'gpmetis'))(graph, '2') Executable(join_path(prefix.bin, 'gpmetis'))(graph, '2')
graph = join_path(source_directory, 'graphs', 'metis.mesh') graph = join_path(source_directory, 'graphs', 'metis.mesh')
Executable(join_path(prefix.bin, 'mpmetis'))(graph, '2') Executable(join_path(prefix.bin, 'mpmetis'))(graph, '2')
@run_after('install')
def darwin_fix(self):
# The shared library is not installed correctly on Darwin; fix this
if (sys.platform == 'darwin') and ('+shared' in self.spec):
fix_darwin_install_name(prefix.lib)