ADD: caching

This commit is contained in:
Germann Elsa Sylvia
2022-10-24 16:37:54 +02:00
parent e32142d02f
commit c0c75c0167
2 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,8 @@ import re
import subprocess
import sys
from functools import cache
assert sys.version_info >= (3, 7), 'Python version is too low, please load a python >= 3.7'
def subprocess_cmd(cmd):
@ -44,6 +46,7 @@ class PmodulePackage():
self.true_status = [self.given_status]
@staticmethod
@cache
def Pmoduliser(pckg_name='', compiler='', mpi_provider=''):
default_module_cmd = 'module search ' + pckg_name + ' -a --all-deps --no-header'