Skip to content
Open
Changes from 1 commit
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,14 @@ 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.4.2", sha256="d1a602f2301dac5a165d8cb5baf31d8a1a3d92f30a7069cda66b98c595a4fa21")
version("2.3.4", sha256="2c293479342d3a74a6261e7139677bf3580ec34c7bc6a389854fc26497c65ad8")
version("2.3.3", sha256="60c5ba00894c809e2c31018bccf22935a9e1f51c0184468efbdd5d27b211009f")

variant(
Expand All @@ -25,6 +30,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 +40,20 @@ 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))
make()
make("PREFIX={0}".format(prefix), "install")
if self.spec.satisfies("~interactive"):
os.remove(join_path(prefix.bin, "prof2-I"))
Loading