hepmc: Add variants for length and momemtum (#19609)

This commit is contained in:
Dr. Christian Tacke 2020-10-30 20:46:19 +01:00 committed by GitHub
parent 5a5c220d0a
commit c3630ed26e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,9 +4,6 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Hepmc(CMakePackage):
"""The HepMC package is an object oriented, C++ event record for
High Energy Physics Monte Carlo generators and simulation."""
@ -21,10 +18,18 @@ class Hepmc(CMakePackage):
version('2.06.06', sha256='8cdff26c10783ed4248220a84a43b7e1f9b59cc2c9a29bd634d024ca469db125')
version('2.06.05', sha256='4c411077cc97522c03b74f973264b8d9fd2b6ccec0efc7ceced2645371c73618')
variant('length', default='MM', values=('CM', 'MM'), multi=False,
description='Unit of length')
variant('momentum', default='GEV', values=('GEV', 'MEV'), multi=False,
description='Unit of momentum')
depends_on('cmake@2.8.9:', type='build')
def cmake_args(self):
return ['-Dmomentum:STRING=GEV', '-Dlength:STRING=MM']
return [
self.define_from_variant('momentum'),
self.define_from_variant('length')
]
def url_for_version(self, version):
if version <= Version("2.06.08"):