fix python installation

This commit is contained in:
Denis Davydov 2016-03-24 13:47:07 +01:00
parent 416fcd0810
commit c33a63cabc

View file

@ -186,3 +186,14 @@ def install(self, spec, prefix):
cmake('..', *options)
make()
make('install')
# When trilinos is built with Python, libpytrilinos is included through
# cmake configure files. Namely, Trilinos_LIBRARIES in TrilinosConfig.cmake
# contains pytrilinos. This leads to a run-time error:
# Symbol not found: _PyBool_Type
# and prevents Trilinos to be used in any C++ code, which links executable
# against the libraries listed in Trilinos_LIBRARIES.
# See https://github.com/Homebrew/homebrew-science/issues/2148#issuecomment-103614509
# A workaround it to remove PyTrilinos from the COMPONENTS_LIST :
if '+python' in self.spec:
filter_file(r'(?:SET\(COMPONENTS_LIST.*)(PyTrilinos;)(?:.*)', '', '%s/cmake/Trilinos/TrilinosConfig.cmake' % prefix.lib)