Specify Python executable in VTK package (#9000)

This commit is contained in:
Adam J. Stewart 2018-08-17 14:51:49 -05:00 committed by GitHub
parent e04fb382b1
commit 99492dc910
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -116,15 +116,20 @@ def cmake_args(self):
'-DNETCDF_C_ROOT={0}'.format(spec['netcdf'].prefix),
'-DNETCDF_CXX_ROOT={0}'.format(spec['netcdf-cxx'].prefix),
# Enable/Disable wrappers for Python.
'-DVTK_WRAP_PYTHON={0}'.format(
'ON' if '+python' in spec else 'OFF'),
# Disable wrappers for other languages.
'-DVTK_WRAP_JAVA=OFF',
'-DVTK_WRAP_TCL=OFF',
]
# Enable/Disable wrappers for Python.
if '+python' in spec:
cmake_args.extend([
'-DVTK_WRAP_PYTHON=ON',
'-DPYTHON_EXECUTABLE={0}'.format(spec['python'].command.path)
])
else:
cmake_args.append('-DVTK_WRAP_PYTHON=OFF')
if 'darwin' in spec.architecture:
cmake_args.extend([
'-DCMAKE_MACOSX_RPATH=ON'