diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/catalyst/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/catalyst/package.py | 68 |
1 files changed, 7 insertions, 61 deletions
diff --git a/var/spack/repos/builtin/packages/catalyst/package.py b/var/spack/repos/builtin/packages/catalyst/package.py index 4cf688c158..7bd98e73d9 100644 --- a/var/spack/repos/builtin/packages/catalyst/package.py +++ b/var/spack/repos/builtin/packages/catalyst/package.py @@ -21,26 +21,13 @@ class Catalyst(CMakePackage): """ homepage = "http://www.paraview.org" - url = "https://www.paraview.org/files/v5.5/ParaView-v5.5.2.tar.gz" - _urlfmt_gz = "https://www.paraview.org/files/v{0}/ParaView-v{1}{2}.tar.gz" - _urlfmt_xz = "https://www.paraview.org/files/v{0}/ParaView-v{1}{2}.tar.xz" + url = "https://www.paraview.org/files/v5.6/ParaView-v5.6.0.tar.xz" maintainers = ["chuckatkins", "danlipsa"] version("5.6.0", sha256="5b49cb96ab78eee0427e25200530ac892f9a3da7725109ce1790f8010cb5b377") - version("5.5.2", sha256="64561f34c4402b88f3cb20a956842394dde5838efd7ebb301157a837114a0e2d") - version("5.5.1", sha256="a6e67a95a7a5711a2b5f95f38ccbff4912262b3e1b1af7d6b9afe8185aa85c0d") - version("5.5.0", sha256="1b619e326ff574de808732ca9a7447e4cd14e94ae6568f55b6581896cd569dff") - version("5.4.1", sha256="390d0f5dc66bf432e202a39b1f34193af4bf8aad2355338fa5e2778ea07a80e4") - version("5.4.0", sha256="f488d84a53b1286d2ee1967e386626c8ad05a6fe4e6cbdaa8d5e042f519f94a9") - version("5.3.0", sha256="046631bbf00775edc927314a3db207509666c9c6aadc7079e5159440fd2f88a0") - version("5.2.0", sha256="894e42ef8475bb49e4e7e64f4ee2c37c714facd18bfbb1d6de7f69676b062c96") - version("5.1.2", sha256="ff02b7307a256b7c6e8ad900dee5796297494df7f9a0804fe801eb2f66e6a187") - version("5.0.1", sha256="caddec83ec284162a2cbc46877b0e5a9d2cca59fb4ab0ea35b0948d2492950bb") - version("4.4.0", sha256="c2dc334a89df24ce5233b81b74740fc9f10bc181cd604109fd13f6ad2381fc73") variant("python", default=False, description="Enable Python support") - variant("python3", default=False, description="Enable Python3 support") variant("essentials", default=False, description="Enable Essentials support") variant("extras", default=False, description="Enable Extras support. Implies Essentials.") variant( @@ -51,61 +38,24 @@ class Catalyst(CMakePackage): variant("osmesa", default=True, description="Use offscreen rendering") conflicts("+osmesa", when="~rendering") - conflicts("+python", when="+python3") - conflicts("+python", when="@5.6:") - conflicts("+python3", when="@:5.5") - - # Workaround for - # adding the following to your packages.yaml - # packages: - # python: - # version: [3, 2] - # without this you'll get: - # paraview requires python version 3:, but spec asked for 2.7.16 - # for `spack spec paraview+python` - # see spack pull request #11539 - # extends('python', when='+python') extends("python", when="+python") - extends("python", when="+python3") # VTK < 8.2.1 can't handle Python 3.8 # This affects Paraview <= 5.7 (VTK 8.2.0) # https://gitlab.kitware.com/vtk/vtk/-/issues/17670 - depends_on("python@3:3.7", when="@:5.7 +python3", type=("build", "run")) - depends_on("python@3:", when="@5.8:+python3", type=("build", "run")) - depends_on("python@2.7:2.8", when="+python", type=("build", "link", "run")) + depends_on("python@3:3.7", when="@:5.7 +python", type=("build", "run")) + depends_on("python@3:", when="@5.8:+python", type=("build", "run")) depends_on("git", type="build") depends_on("mpi") depends_on("py-numpy", when="+python", type=("build", "run")) - depends_on("py-numpy", when="+python3", type=("build", "run")) depends_on("py-mpi4py", when="+python", type=("build", "run")) - depends_on("py-mpi4py", when="+python3", type=("build", "run")) depends_on("gl@3.2:", when="+rendering") depends_on("osmesa", when="+osmesa") depends_on("glx", when="~osmesa") depends_on("cmake@3.3:", type="build") - @when("@5.5.0:5.5.2") - def patch(self): - """Apply the patch (it should be fixed in Paraview 5.6) - at the package dir to the source code in - root_cmakelists_dir.""" - patch_name = "vtkm-catalyst-pv551.patch" - patch = which("patch", required=True) - with working_dir(self.root_cmakelists_dir): - patch("-s", "-p", "1", "-i", join_path(self.package_dir, patch_name), "-d", ".") - - def url_for_version(self, version): - """Handle ParaView version-based custom URLs.""" - if version < Version("5.1.0"): - return self._urlfmt_gz.format(version.up_to(2), version, "-source") - elif version < Version("5.6.0"): - return self._urlfmt_gz.format(version.up_to(2), version, "") - else: - return self._urlfmt_xz.format(version.up_to(2), version, "") - @property def paraview_subdir(self): """The paraview subdirectory name as paraview-major.minor""" @@ -116,7 +66,7 @@ class Catalyst(CMakePackage): """Transcribe spack variants into names of Catalyst Editions""" selected = ["Base"] # Always required - if "+python" in self.spec or "+python3" in self.spec: + if "+python" in self.spec: selected.append("Enable-Python") if "+essentials" in self.spec: @@ -144,9 +94,7 @@ class Catalyst(CMakePackage): catalyst_source_dir = os.path.abspath(self.root_cmakelists_dir) python_path = os.path.realpath( - self.spec["python"].command.path - if ("+python3" in self.spec or "+python" in self.spec) - else sys.executable + self.spec["python"].command.path if "+python" in self.spec else sys.executable ) command = [ @@ -178,13 +126,11 @@ class Catalyst(CMakePackage): else: lib_dir = self.prefix.lib - if self.spec.version <= Version("5.4.1"): - lib_dir = join_path(lib_dir, paraview_subdir) env.set("ParaView_DIR", self.prefix) env.prepend_path("LIBRARY_PATH", lib_dir) env.prepend_path("LD_LIBRARY_PATH", lib_dir) - if "+python" in self.spec or "+python3" in self.spec: + if "+python" in self.spec: python_version = self.spec["python"].version.up_to(2) env.prepend_path( "PYTHONPATH", @@ -234,7 +180,7 @@ class Catalyst(CMakePackage): "-DVTK_USE_OFFSCREEN:BOOL=%s" % variant_bool("+osmesa"), "-DVTK_OPENGL_HAS_OSMESA:BOOL=%s" % variant_bool("+osmesa"), ] - if "+python" in spec or "+python3" in spec: + if "+python" in spec: cmake_args.extend( [ "-DPARAVIEW_ENABLE_PYTHON:BOOL=ON", |