Customization of the Paraview module file to its nonstandard directory structure (#5799)
* Add the custom paraview lib directory structure to the library paths in the paraview module file. * Fixing flake8 issues. * Checking if lib64 exists for paraview module file generation, else use lib. * Fixing more flake8 problems I introduced.
This commit is contained in:
parent
a05bbd7104
commit
18d2fe7647
@ -23,6 +23,7 @@
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
##############################################################################
|
||||
from spack import *
|
||||
import os
|
||||
|
||||
|
||||
class Paraview(CMakePackage):
|
||||
@ -89,6 +90,17 @@ def url_for_version(self, version):
|
||||
else:
|
||||
return self._urlfmt.format(version.up_to(2), version, '')
|
||||
|
||||
def setup_environment(self, spack_env, run_env):
|
||||
if os.path.isdir(self.prefix.lib64):
|
||||
lib_dir = self.prefix.lib64
|
||||
else:
|
||||
lib_dir = self.prefix.lib
|
||||
paraview_version = 'paraview-%s' % self.spec.version.up_to(2)
|
||||
run_env.prepend_path('LIBRARY_PATH', join_path(lib_dir,
|
||||
paraview_version))
|
||||
run_env.prepend_path('LD_LIBRARY_PATH', join_path(lib_dir,
|
||||
paraview_version))
|
||||
|
||||
def cmake_args(self):
|
||||
"""Populate cmake arguments for ParaView."""
|
||||
spec = self.spec
|
||||
|
Loading…
Reference in New Issue
Block a user