From 11340a332d87071a5549362fed629950dd7d9975 Mon Sep 17 00:00:00 2001 From: Hadrien G Date: Tue, 18 Feb 2020 23:04:59 +0100 Subject: [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 --- var/spack/repos/builtin/packages/hepmc/package.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'var') 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): -- cgit v1.2.3-70-g09d2