From 69d98e7a1893df58ef893ed15ea4d4c66ccec437 Mon Sep 17 00:00:00 2001 From: Devon R Date: Thu, 15 Oct 2020 16:02:52 +0900 Subject: [PATCH] Update install.sh to include the dependencies of diff.py for --extra This also pulls the dependencies out of install.sh into their own requirements.txt and requirements_extra.txt so separate distros won't have to maintain their Python dependencies separately --- install.sh | 8 ++++---- requirements.txt | 1 + requirements_extra.txt | 6 ++++++ 3 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 requirements.txt create mode 100644 requirements_extra.txt diff --git a/install.sh b/install.sh index 72a7008707..177b8bde72 100755 --- a/install.sh +++ b/install.sh @@ -5,12 +5,12 @@ if command -v apt &> /dev/null; then echo "Installing packages for Ubuntu" sudo apt install -y git python3 python3-pip build-essential binutils-mips-linux-gnu zlib1g-dev libyaml-dev gcc-multilib || exit 1 - python3 -m pip install capstone + python3 -m pip install -U -r requirements.txt if [[ $1 == "--extra" ]]; then echo "Installing extra" sudo apt install -y clang-tidy astyle || exit 1 - python3 -m pip install stringcase || exit 1 + python3 -m pip install -U -r requirements_extra.txt || exit 1 fi echo "Done" @@ -26,7 +26,7 @@ if command -v pacman &> /dev/null; then # Install dependencies sudo pacman -S --noconfirm --needed git python python-pip base-devel zlib libyaml lib32-glibc || exit 1 - python3 -m pip install capstone + python3 -m pip install -U -r requirements.txt # Install binutils if required if ! command -v mips-linux-gnu-ar &> /dev/null; then @@ -51,7 +51,7 @@ if command -v pacman &> /dev/null; then if [[ $1 == "--extra" ]]; then echo "Installing extra" sudo pacman -S --noconfirm --needed clang astyle || exit 1 - python3 -m pip install stringcase || exit 1 + python3 -m pip install -U -r requirements_extra.txt || exit 1 fi echo "Done" diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000000..e11ec11eab --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +capstone diff --git a/requirements_extra.txt b/requirements_extra.txt new file mode 100644 index 0000000000..607b823d62 --- /dev/null +++ b/requirements_extra.txt @@ -0,0 +1,6 @@ +ansiwrap +colorama +cxxfilt +python-Levenshtein +stringcase +watchdog