python-project-installed-virtualenv
Description
Install a local folder that contains a Python project into a virtualenv
Variables
Name | Type | Default | Description |
---|---|---|---|
|
string | -- | The local path. Required |
|
string | -- | The (absolute) virtualenv (base) path. Required |
|
boolean | False | Whether to install in 'editable mode' (using '-e' flag). |
|
boolean | False | Whether to ignore any potential errors. |
|
string | -- | The user to run the command as. |
Code
doc: short_help: Install a local folder that contains a Python project into a virtualenv args: _import: execute-shell virtualenv_path: doc: short_help: The (absolute) virtualenv (base) path. type: string required: true src_path: doc: short_help: The local path. type: string required: true user: doc: short_help: The user to run the command as. type: string empty: false required: false ignore_error: doc: short_help: Whether to ignore any potential errors. type: boolean required: false default: false editable: doc: short_help: Whether to install in 'editable mode' (using '-e' flag). type: boolean default: false cli: param_decls: - --editable - -e frecklets: - execute-shell: frecklet::desc: short: "install into venv '{{:: virtualenv_path ::}}': {{:: src_path ::}}" command: 'source {{:: virtualenv_path ::}}/bin/activate && pip install {%:: if editable ::%}-e {%:: endif ::%}{{:: src_path ::}}' become_user: '{{:: user ::}}' ignore_error: '{{:: ignore_error ::}}' shell_executable: /bin/bash
frecklecute python-project-installed-virtualenv --help Usage: frecklecute python-project-installed-virtualenv [OPTIONS] Install a local folder that contains a Python project into a virtualenv Options: --src-path SRC_PATH The local path. [required] --virtualenv-path VIRTUALENV_PATH The (absolute) virtualenv (base) path. [required] -e, --editable Whether to install in 'editable mode' (using '-e' flag). --ignore-error / --no-ignore-error Whether to ignore any potential errors. --user USER The user to run the command as. --help Show this message and exit.
# -*- coding: utf-8 -*- # # module path: pycklets.python_project_installed_virtualenv.PythonProjectInstalledVirtualenv # from dataclasses import dataclass from pyckles import AutoPycklet from typing import * # noqa @dataclass class PythonProjectInstalledVirtualenv(AutoPycklet): """Install a local folder that contains a Python project into a virtualenv Args: editable: Whether to install in 'editable mode' (using '-e' flag). ignore_error: Whether to ignore any potential errors. src_path: The local path. user: The user to run the command as. virtualenv_path: The (absolute) virtualenv (base) path. """ FRECKLET_ID = "python-project-installed-virtualenv" editable: bool = None ignore_error: bool = None src_path: str = None user: str = None virtualenv_path: str = None def __post_init__(self): super(PythonProjectInstalledVirtualenv, self).__init__(var_names=["editable", "ignore_error", "src_path", "user", "virtualenv_path"]) frecklet_class = PythonProjectInstalledVirtualenv
# -*- coding: utf-8 -*- # # module path: pycklets.python_project_installed_virtualenv.PythonProjectInstalledVirtualenv # from pyckles import AutoPycklet class PythonProjectInstalledVirtualenv(AutoPycklet): """Install a local folder that contains a Python project into a virtualenv Args: editable: Whether to install in 'editable mode' (using '-e' flag). ignore_error: Whether to ignore any potential errors. src_path: The local path. user: The user to run the command as. virtualenv_path: The (absolute) virtualenv (base) path. """ FRECKLET_ID = "python-project-installed-virtualenv" def __init__(self, editable=None, ignore_error=None, src_path=None, user=None, virtualenv_path=None): super(PythonProjectInstalledVirtualenv, self).__init__(var_names=["editable", "ignore_error", "src_path", "user", "virtualenv_path"]) self._editable = editable self._ignore_error = ignore_error self._src_path = src_path self._user = user self._virtualenv_path = virtualenv_path @property def editable(self): return self._editable @editable.setter def editable(self, editable): self._editable = editable @property def ignore_error(self): return self._ignore_error @ignore_error.setter def ignore_error(self, ignore_error): self._ignore_error = ignore_error @property def src_path(self): return self._src_path @src_path.setter def src_path(self, src_path): self._src_path = src_path @property def user(self): return self._user @user.setter def user(self, user): self._user = user @property def virtualenv_path(self): return self._virtualenv_path @virtualenv_path.setter def virtualenv_path(self, virtualenv_path): self._virtualenv_path = virtualenv_path frecklet_class = PythonProjectInstalledVirtualenv