diff --git a/repos/spack_repo/builtin/packages/professor/package.py b/repos/spack_repo/builtin/packages/professor/package.py index 67709dea16e..9da71472dee 100644 --- a/repos/spack_repo/builtin/packages/professor/package.py +++ b/repos/spack_repo/builtin/packages/professor/package.py @@ -13,9 +13,12 @@ class Professor(Package): homepage = "https://professor.hepforge.org/" url = "https://professor.hepforge.org/downloads/?f=Professor-2.3.3.tar.gz" + git = "https://gitlab.com/hepcedar/professor" + list_url = "https://professor.hepforge.org/downloads/" maintainers("mjk655") + version("2.5.6", sha256="7537f23078bd56f00e67e1f96c7a24026b255cc26907ad5d5234b8371e49b3c7") version("2.3.3", sha256="60c5ba00894c809e2c31018bccf22935a9e1f51c0184468efbdd5d27b211009f") variant( @@ -25,23 +28,35 @@ class Professor(Package): ) depends_on("cxx", type="build") # generated + depends_on("gmake", type="build") + depends_on("py-pip", type="build") depends_on("yoda") depends_on("eigen") depends_on("py-cython") depends_on("py-iminuit") + depends_on("py-iminuit@2:", when="@2.4:") depends_on("py-matplotlib") depends_on("py-matplotlib backend=wx", when="+interactive") depends_on("root") - depends_on("gmake", type="build") extends("python") + def patch(self): + filter_file("PROF_ROOT=$(PWD)", "PROF_ROOT=$(CURDIR)", "Makefile", string=True) + def setup_build_environment(self, env: EnvironmentModifications) -> None: env.set("PROF_VERSION", self.spec.version) + @run_before("install", when="@2.5.0:") + def configure(self, spec, prefix): + with working_dir(self.stage.source_path): + configure = Executable("configure") + configure(f"--prefix={prefix}", f"--with-eigen={self.spec['eigen'].prefix}") + def install(self, spec, prefix): - make() - make("PREFIX={0}".format(prefix), "install") + with working_dir(self.stage.source_path): + make() + make("PREFIX={0}".format(prefix), "install") if self.spec.satisfies("~interactive"): os.remove(join_path(prefix.bin, "prof2-I")) diff --git a/stacks/hep/spack.yaml b/stacks/hep/spack.yaml index 6d7a2dc8752..6df9c49c0ae 100644 --- a/stacks/hep/spack.yaml +++ b/stacks/hep/spack.yaml @@ -118,7 +118,7 @@ spack: - pandorasdk - photos +hepmc3 - podio +rntuple +sio - #- professor + - professor - py-awkward - py-boost-histogram - py-dask-awkward ~io