Skip to content

Commit d9cf03a

Browse files
authored
Install system-provided autopep8 where available (#2397)
1 parent 588baf0 commit d9cf03a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

scripts/setup/ubuntu/install_deps.sh

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ DEPS=(
3030

3131
# Version specific dependencies.
3232
declare -A VERSION_DEPS
33-
VERSION_DEPS["20.04"]="universal-ctags python-is-python3"
33+
VERSION_DEPS["20.04"]="universal-ctags python-is-python3 python3-autopep8"
3434
VERSION_DEPS["18.04"]="exuberant-ctags"
3535

3636
UBUNTU_VERSION=$(lsb_release -rs)
@@ -47,11 +47,9 @@ sudo apt-get --yes update
4747
sudo DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --yes "${DEPS[@]}" ${OTHER_DEPS[@]}
4848

4949
# Add Python package dependencies
50-
PYTHON_DEPS=(
51-
autopep8
52-
)
53-
54-
python3 -m pip install "${PYTHON_DEPS[@]}"
50+
if [[ "x$UBUNTU_VERSION" == "x18.04" ]] ; then
51+
python3 -m pip install autopep8
52+
fi
5553

5654
# Get the directory containing this script
5755
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

0 commit comments

Comments
 (0)