venvmod.modulefile module
Environment module modification/installation.
- venvmod.modulefile.get_module_file_directory(virtual_env: Path) Path[source]
Gets the modulefiles directory
- Parameters:
virtual_env (Path) – Path to virtual env
- Returns:
virtual_env path + “/etc/modulefiles”
- Return type:
Path
- venvmod.modulefile.test_if_already_init(virtual_env: Path)[source]
checks if venv-modulefile is already initialized.
- Parameters:
virtual_env (Path) – Path to virtual env
- class venvmod.modulefile.ModuleInstaller(version_or_path: str, install_prefix: str, cache_directory: str)[source]
Bases:
objectClass to install Environment Module.
Methods
run([verbose])run installer
- venvmod.modulefile.upgrade_modulefile(virtual_env: Path, module_prefix: Path)[source]
Upgrade modulefile in venv
- Parameters:
virtual_env (Path) – Path to virtual env
module_prefix (Path) – Modulefile install prefix
- venvmod.modulefile.create_modulefile(virtual_env: Path, module_name: str = 'venvmod', module_category: str = None, log_load: str = '')[source]
Creates a modulefile.
- venvmod.modulefile.upgrade_venv(virtual_env: Path)[source]
Ugrade virtual env with modulefile at activate and deactivate.
- Parameters:
env_prefix (Path) – Path to environment.
- Raises:
AssertionError – If the activate script is not found.
AssertionError – If the module is already loaded frome the script but from another modulefile directory.