Skip to content
Open
Show file tree
Hide file tree
Changes from 4 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
18 changes: 15 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,6 +28,8 @@ 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")
Expand All @@ -33,15 +38,22 @@ class Professor(Package):
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)

def install(self, spec, prefix):
make()
make("PREFIX={0}".format(prefix), "install")
with working_dir(self.stage.source_path):
configure = Executable("./configure")
configure(
"--prefix={0}".format(prefix), "--with-eigen={0}".format(spec["eigen"].prefix)
)
Comment thread
wdconinc marked this conversation as resolved.
Outdated
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