diff --git a/velocitas_lib/pip_tools.py b/velocitas_lib/pip_tools.py index 39b2a83..4220f25 100644 --- a/velocitas_lib/pip_tools.py +++ b/velocitas_lib/pip_tools.py @@ -1,4 +1,4 @@ -# Copyright (c) 2023-2024 Contributors to the Eclipse Foundation +# Copyright (c) 2024 Contributors to the Eclipse Foundation # # This program and the accompanying materials are made available under the # terms of the Apache License, Version 2.0 which is available at @@ -14,6 +14,7 @@ """Provides methods and functions to download and install dependencies.""" +import argparse import os import subprocess import sys @@ -49,3 +50,18 @@ def install_requirements(requirements_path: str) -> None: VSpec download.""" if not is_velocitas_offline_variant(): pip(["install", "-r", requirements_path]) + + +if __name__ == "__main__": + # The arguments we accept + parser = argparse.ArgumentParser( + description="Install requirments from specified file path via pip." + ) + parser.add_argument( + "requiremnts_filepath", + type=str, + help="Path to requiremnts file to be used.", + ) + args = parser.parse_args() + + install_requirements(args.requiremnts_filepath)