buildenv.manager ================ .. py:module:: buildenv.manager Attributes ---------- .. autoapisummary:: buildenv.manager.BUILDENV_OK Classes ------- .. autoapisummary:: buildenv.manager.BuildEnvManager Module Contents --------------- .. py:data:: BUILDENV_OK :value: 'buildenvOK' Valid buildenv tag file .. py:class:: BuildEnvManager(project_path: pathlib.Path, venv_bin_path: pathlib.Path = None) **buildenv** manager entry point :param project_path: Path to the current project root folder :param venv_bin_path: Path to venv binary folder to be used (mainly for test purpose; if None, will use current venv executable) .. py:attribute:: venv_bin_path :value: None .. py:attribute:: venv_path .. py:attribute:: venv_root_path .. py:attribute:: project_path .. py:attribute:: project_script_path .. py:attribute:: loader .. py:attribute:: is_windows .. py:attribute:: venv_context .. py:attribute:: buildenv_ok .. py:attribute:: project_buildenv_ok .. py:attribute:: is_valid_projet :value: True .. py:attribute:: renderer .. py:method:: init(options: argparse.Namespace = None) Build environment initialization. This method generates loading scripts in current project folder (if not invoked from loading scripts; can't update them while they're running). If the buildenv is not marked as ready yet, this method also: * verify recommended git files * invoke extra environment initializers defined by sub-classes * mark buildenv as ready :param options: Input command line parsed options .. py:method:: register_completion(command: str) Register a new command for completion in activation scripts. This command must be a python entry point supporting argcomplete completion. :param command: New command to be registered .. py:method:: register_ignored_pattern(pattern: str) Register a new pattern to be added to generated .gitignore file :param pattern: New pattern to be ignored .. py:method:: add_activation_file(name: str, extension: str, template: str, keywords: dict[str, str] = None) Add activation file in venv (in "//activate.d" folder). This file will be loaded each time the venv is activated. :param name: Name of the activation script :param extension: Extension of the activation script :param template: Path to Jinja template file to be rendered for this script :param keyword: Map of keywords provided to template .. py:method:: shell(options: argparse.Namespace) Verify that the context is OK to run a shell, then throws a specific return code so that loading script is told to spawn an interactive shell. :param options: Input command line parsed options .. py:method:: run(options: argparse.Namespace) Verify that the context is OK to run a command, then: * generates command script containing the command to be executed * throws a specific return code so that loading script is told to execute the generated command script :param options: Input command line parsed options .. py:method:: upgrade(options: argparse.Namespace) Upgrade python venv installed packages to latest version :param options: Input command line parsed options