Make it possible to build whizard from a git checkout (#43447)

This commit is contained in:
Thomas Madlener 2024-04-03 21:55:57 +02:00 committed by GitHub
parent dfe537f688
commit 2c17cd365d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack.package import *
@ -121,6 +123,14 @@ def setup_build_environment(self, env):
env.set("FC", self.compiler.fc)
env.set("F77", self.compiler.fc)
@run_before("autoreconf")
def prepare_whizard(self):
# As described in the manual (SVN Repository version)
# https://whizard.hepforge.org/manual/manual003.html#sec%3Aprerequisites
if not os.path.exists("configure.ac"):
shell = which("sh")
shell("build_master.sh")
def configure_args(self):
spec = self.spec
enable_hepmc = "no" if "hepmc=off" in spec else "yes"