Skip to content

Commit

Permalink
Add required main function
Browse files Browse the repository at this point in the history
  • Loading branch information
BjoernAtBosch committed Aug 14, 2024
1 parent 8f8937c commit e13f79e
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion velocitas_lib/pip_tools.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -14,6 +14,7 @@

"""Provides methods and functions to download and install dependencies."""

import argparse
import os
import subprocess
import sys
Expand Down Expand Up @@ -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)

0 comments on commit e13f79e

Please sign in to comment.