Skip to content

Commit

Permalink
improve pip module management
Browse files Browse the repository at this point in the history
  • Loading branch information
guirem committed Jan 29, 2020
1 parent 121aa7f commit 386ed4b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions resources/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
setuptools
requests>=2.21.0
protobuf
zeroconf>=0.24.4
click
bs4
six
tqdm
websocket-client
15 changes: 15 additions & 0 deletions resources/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

pip3cmd=$(compgen -ac | grep -E '^pip-?3' | sort -r | head -1)
if [[ -z $pip3cmd ]]; then # pip3 not found
if python3 -m pip -V 2>&1 | grep -q -i "^pip " ; then # but try other way
pip3cmd="python3 -m pip"
fi

if [[ ! -z $pip3cmd ]]; then # pip3 found
echo "-- Updating requirements :"
echo $($pip3cmd install -r requirements.txt)
else
echo ""
echo "Error: Cound not found pip3 program to update python dependencies !"
fi

0 comments on commit 386ed4b

Please sign in to comment.