mirror of
https://github.com/Telecominfraproject/wlan-lanforge-scripts.git
synced 2025-11-01 19:28:00 +00:00
Improving update_dependencies by making pyjwt an optional update/install
Signed-off-by: Matthew Stidham <stidmatt@gmail.com>
This commit is contained in:
@@ -11,11 +11,22 @@ NOTES: Install as root
|
||||
'''
|
||||
|
||||
import subprocess
|
||||
import argparse
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--pyjwt', help='Install PyJWT which is necessary for GhostRequest', action="store_true")
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
print("Installing Script Python3 Dependencies")
|
||||
packages = ['pandas', 'plotly', 'numpy', 'cryptography', 'paramiko', 'bokeh','pyarrow', 'websocket-client', 'xlsxwriter',\
|
||||
'pyshark', 'influxdb', 'influxdb-client', 'matplotlib', 'pdfkit', 'pip-search', 'pyserial', 'pexpect-serial' ,'scp', 'pyjwt',\
|
||||
'pyshark', 'influxdb', 'influxdb-client', 'matplotlib', 'pdfkit', 'pip-search', 'pyserial', 'pexpect-serial' ,'scp',\
|
||||
'dash', 'kaleido']
|
||||
if args.pyjwt is True:
|
||||
packages.append('pyjwt')
|
||||
else:
|
||||
print('Not installing PyJWT')
|
||||
packages_installed = []
|
||||
packages_failed =[]
|
||||
subprocess.call("pip3 uninstall jwt", shell=True)
|
||||
@@ -23,7 +34,7 @@ def main():
|
||||
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))
|
||||
print("Package {} install SUCCESS Returned Value: {} ".format(package, res))
|
||||
packages_installed.append(package)
|
||||
else:
|
||||
print("Package {} install FAILED Returned Value: {} ".format(package, res))
|
||||
|
||||
Reference in New Issue
Block a user