pcvs.helpers.pm module

class pcvs.helpers.pm.ModuleManager(spec)[source]

Bases: PManager

handles Module package manager

constructor for Module package manager

Parameters:

spec (str) – specifications for Module manager

get(load=True, install=False)[source]

get the command to install the specified package

Parameters:
  • load (bool) – load the specified package, defaults to True

  • install (bool) – install the specified package, defaults to False

Return type:

str

Returns:

command to install/load the package

install()[source]

Load module.

Return type:

None

class pcvs.helpers.pm.PManager(spec=None)[source]

Bases: ABC

generic Package Manager

constructor for PManager object

Parameters:

spec (str | None) – specifications for this Package Manager, defaults to None

abstractmethod get(load, install)[source]

Get specified packages for this manager

Parameters:
  • load (bool) – True to load the package

  • install (bool) – True to install the package

Return type:

str

abstractmethod install()[source]

install specified packages

Return type:

None

class pcvs.helpers.pm.SpackManager(spec)[source]

Bases: PManager

handles Spack package manager

constructor for SpackManager object

Parameters:

spec (str) – specifications for Spack manager

get(load=True, install=True)[source]

get the commands to install the specified package

Parameters:
  • load (bool) – load the specified package, defaults to True

  • install (bool) – install the specified package, defaults to True

Return type:

str

Returns:

command to install/load the package

install()[source]

Load spack.

Return type:

None

pcvs.helpers.pm.identify(pm_node)[source]

identifies where

Parameters:

pm_node (dict) – pm node

Return type:

list[PManager]

Returns:

list of package manager