From 76ca264b7299f57019623335d8ecb1b2bb05db12 Mon Sep 17 00:00:00 2001 From: snehring <7978778+snehring@users.noreply.github.com> Date: Mon, 1 Jul 2024 09:51:26 -0500 Subject: py-tesorter: add post install hmmpress step (#44940) Signed-off-by: Shane Nehring --- .../repos/builtin/packages/py-tesorter/package.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/var/spack/repos/builtin/packages/py-tesorter/package.py b/var/spack/repos/builtin/packages/py-tesorter/package.py index feb1848bf5..3cdebb3b7a 100644 --- a/var/spack/repos/builtin/packages/py-tesorter/package.py +++ b/var/spack/repos/builtin/packages/py-tesorter/package.py @@ -3,6 +3,8 @@ # # SPDX-License-Identifier: (Apache-2.0 OR MIT) +from glob import glob + from spack.package import * @@ -29,5 +31,20 @@ class PyTesorter(PythonPackage): depends_on("py-biopython", type=("build", "run")) depends_on("py-xopen", type=("build", "run")) - depends_on("hmmer@3.3:", type="run") + depends_on("hmmer@3.3:", type=("build", "run")) depends_on("blast-plus", type="run") + + @run_after("install") + def run_hmmpress(self): + hmmpress = Executable(self.spec["hmmer"].prefix.bin.hmmpress) + db_dir = join_path( + self.prefix, + "lib", + f"python{self.spec['python'].version.dotted[:2]}", + "site-packages", + "TEsorter", + "database", + ) + with working_dir(db_dir): + for f in glob("*.hmm"): + hmmpress(f) -- cgit v1.2.3-70-g09d2