update_dependencies.py : check for os to be able to run on windows

Signed-off-by: Chuck SmileyRekiere <chuck.smileyrekiere@candelatech.com>
This commit is contained in:
Chuck SmileyRekiere
2021-10-29 08:32:45 -06:00
parent 053b577497
commit 93df56c354

View File

@@ -2,6 +2,7 @@
import subprocess
import argparse
import os
def main():
parser = argparse.ArgumentParser(
@@ -33,7 +34,10 @@ def main():
packages_failed =[]
subprocess.call("pip3 uninstall jwt", shell=True)
for package in packages:
command = "pip3 install {} >/tmp/pip3-stdout 2>/tmp/pip3-stderr".format(package)
if os.name == 'nt':
command = "pip3 install {} ".format(package)
else:
command = "pip3 install {} >/tmp/pip3-stdout 2>/tmp/pip3-stderr".format(package)
res = subprocess.call(command, shell=True)
if res == 0:
print("Package {} install SUCCESS Returned Value: {} ".format(package, res))