diff --git a/neon_speech/cli.py b/neon_speech/cli.py index 3a5aca9..477fc51 100644 --- a/neon_speech/cli.py +++ b/neon_speech/cli.py @@ -87,7 +87,7 @@ def run(module, package, force_install): @click.option("--force-install", "-f", default=False, is_flag=True, help="Force pip installation of configured module") def install_plugin(module, package, force_install): - log_deprecation("`install-plugin` replaced by `install-dependencies`", "2.0.0") + log_deprecation("`install-plugin` replaced by `install-dependencies`", "5.0.0") from neon_speech.utils import install_stt_plugin from ovos_config.config import Configuration speech_config = Configuration() @@ -102,6 +102,7 @@ def install_plugin(module, package, force_install): if not module: click.echo("Plugin specified without module") + @neon_speech_cli.command(help="Install neon-speech module dependencies from config & cli") @click.option("--package", "-p", default=[], multiple=True, help="Additional package to install (can be repeated)") @@ -114,6 +115,7 @@ def install_dependencies(package: List[str]): LOG.info(f"pip exit code: {result}") sys.exit(result) + @neon_speech_cli.command(help="Install a STT Plugin") @click.option("--plugin", "-p", default=None, help="STT module to init") diff --git a/neon_speech/utils.py b/neon_speech/utils.py index 6d67d66..6821a42 100644 --- a/neon_speech/utils.py +++ b/neon_speech/utils.py @@ -60,13 +60,15 @@ def _plugin_to_package(plugin: str) -> str: } return known_plugins.get(plugin) or plugin + def build_extra_dependency_list(config: Union[dict, Configuration], additional: List[str] = []) -> List[str]: extra_dependencies = config.get("extra_dependencies", {}) dependencies = additional + extra_dependencies.get("global", []) + extra_dependencies.get("voice", []) return dependencies -@deprecated("Replaced by `neon_utils.packaging_utils.install_packages_from_pip`", "2.0.0") + +@deprecated("Replaced by `neon_utils.packaging_utils.install_packages_from_pip`", "5.0.0") def install_stt_plugin(plugin: str) -> bool: """ Install an stt plugin using pip