mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-18 11:04:51 +00:00
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:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import argparse
|
import argparse
|
||||||
|
import os
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
@@ -33,6 +34,9 @@ def main():
|
|||||||
packages_failed =[]
|
packages_failed =[]
|
||||||
subprocess.call("pip3 uninstall jwt", shell=True)
|
subprocess.call("pip3 uninstall jwt", shell=True)
|
||||||
for package in packages:
|
for package in packages:
|
||||||
|
if os.name == 'nt':
|
||||||
|
command = "pip3 install {} ".format(package)
|
||||||
|
else:
|
||||||
command = "pip3 install {} >/tmp/pip3-stdout 2>/tmp/pip3-stderr".format(package)
|
command = "pip3 install {} >/tmp/pip3-stdout 2>/tmp/pip3-stderr".format(package)
|
||||||
res = subprocess.call(command, shell=True)
|
res = subprocess.call(command, shell=True)
|
||||||
if res == 0:
|
if res == 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user