summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2018-12-16 23:17:23 -0800
committerTodd Gamblin <tgamblin@llnl.gov>2018-12-30 00:19:08 -0800
commit527ff860f01de34e34f8c7be8e5682745504d774 (patch)
tree97f85936301436e89e6c371033af0c070119dda6 /var
parent19b7b1592947c5a74fbb159c0a0820cc5013a077 (diff)
downloadspack-527ff860f01de34e34f8c7be8e5682745504d774.tar.gz
spack-527ff860f01de34e34f8c7be8e5682745504d774.tar.bz2
spack-527ff860f01de34e34f8c7be8e5682745504d774.tar.xz
spack-527ff860f01de34e34f8c7be8e5682745504d774.zip
patches: clean up patch.py, directives, and package class properties
- cleanup patch.py: - make patch.py constructors more understandable - loosen coupling of patch.py with package - in Package: make package_dir, module, and namespace class properties - These were previously instance properties and couldn't be called from directives, e.g. in patch.create() - make them class properties so that they can be used in class definition - also add some instance properties to delegate to class properties so that prior usage on Package objects still works
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/catalyst/package.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/catalyst/package.py b/var/spack/repos/builtin/packages/catalyst/package.py
index 03f9e4dbcf..01983c8687 100644
--- a/var/spack/repos/builtin/packages/catalyst/package.py
+++ b/var/spack/repos/builtin/packages/catalyst/package.py
@@ -7,7 +7,6 @@ from spack import *
import os
import subprocess
import llnl.util.tty as tty
-from spack.patch import absolute_path_for_package
class Catalyst(CMakePackage):
@@ -18,7 +17,7 @@ class Catalyst(CMakePackage):
homepage = 'http://www.paraview.org'
url = "http://www.paraview.org/files/v5.5/ParaView-v5.5.2.tar.gz"
_urlfmt_gz = 'http://www.paraview.org/files/v{0}/ParaView-v{1}{2}.tar.gz'
- _urlfmt_xz = 'http://www.paraview.org/files/v{0}/ParaView-v{1}{2}.tar.xz'
+ _urlfmt_xz = 'http://www.paraview.org/files/v{0}/ParaView-v{1}{2}.tar.xz'
version('5.5.2', '7eb93c31a1e5deb7098c3b4275e53a4a')
version('5.5.1', 'a7d92a45837b67c3371006cc45163277')
@@ -52,11 +51,10 @@ class Catalyst(CMakePackage):
at the package dir to the source code in
root_cmakelists_dir."""
patch_name = 'vtkm-catalyst-pv551.patch'
- pkg_dir = os.path.dirname(absolute_path_for_package(self))
patch = which("patch", required=True)
with working_dir(self.root_cmakelists_dir):
patch('-s', '-p', '1', '-i',
- join_path(pkg_dir, patch_name),
+ join_path(self.package_dir, patch_name),
"-d", '.')
def url_for_version(self, version):