summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorHadrien G <grasland@lal.in2p3.fr>2020-02-18 23:04:59 +0100
committerGitHub <noreply@github.com>2020-02-18 16:04:59 -0600
commit11340a332d87071a5549362fed629950dd7d9975 (patch)
tree03362cdd82fcec098fa484d85bf024ba415dea96 /var
parent3ee0295fb29e08870e04f849de961266f95e9fea (diff)
downloadspack-11340a332d87071a5549362fed629950dd7d9975.tar.gz
spack-11340a332d87071a5549362fed629950dd7d9975.tar.bz2
spack-11340a332d87071a5549362fed629950dd7d9975.tar.xz
spack-11340a332d87071a5549362fed629950dd7d9975.zip
[hepmc] Finish the HepMC3 spackage update (#15036)
* Finish the HepMC3 spackage update - Update CMake requirement per latest master - Account for Python variant, add python dependency if used - Account for ROOT I/O variant, add ROOT dependency if used * Please flake8
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/hepmc/package.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/hepmc/package.py b/var/spack/repos/builtin/packages/hepmc/package.py
index 74f1141842..2828a179ff 100644
--- a/var/spack/repos/builtin/packages/hepmc/package.py
+++ b/var/spack/repos/builtin/packages/hepmc/package.py
@@ -26,12 +26,24 @@ class Hepmc(CMakePackage):
version('2.06.06', sha256='8cdff26c10783ed4248220a84a43b7e1f9b59cc2c9a29bd634d024ca469db125')
version('2.06.05', sha256='4c411077cc97522c03b74f973264b8d9fd2b6ccec0efc7ceced2645371c73618')
- depends_on('cmake@2.6:', type='build')
+ variant('python', default=False, description='Enable Python bindings')
+ variant('rootio', default=False, description='Enable ROOT I/O')
+
+ depends_on('cmake@2.8.9:', type='build')
+ # FIXME: Officially supports Python3, but the build system doesn't find it
+ depends_on('python@:2.99.99', when='+python')
+ depends_on('root', when='+rootio')
+
+ conflicts('+python', when='@:3.1.99')
+ conflicts('+rootio', when='@:2.99.99')
def cmake_args(self):
+ spec = self.spec
return [
'-Dmomentum:STRING=GEV',
'-Dlength:STRING=MM',
+ '-DHEPMC3_ENABLE_PYTHON={0}'.format(spec.satisfies('+python')),
+ '-DHEPMC3_ENABLE_ROOTIO={0}'.format(spec.satisfies('+rootio'))
]
def url_for_version(self, version):