Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions repos/spack_repo/builtin/packages/professor/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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"))
2 changes: 1 addition & 1 deletion stacks/hep/spack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ spack:
- pandorasdk
- photos +hepmc3
- podio +rntuple +sio
#- professor
- professor
- py-awkward
- py-boost-histogram
- py-dask-awkward ~io
Expand Down
Loading