cmake and Tools/setup.sh default to python3

This commit is contained in:
Daniel Agar 2019-05-29 17:55:58 -04:00
parent f593e3de9c
commit 4b3f68f90c
3 changed files with 29 additions and 18 deletions

View File

@ -18,22 +18,34 @@ do
fi
done
# install Homebrew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null
# confirm Homebrew installed correctly
brew doctor
# Install px4-dev formula
brew tap PX4/px4
if [ brew ls --versions px4-dev > /dev/null ]; then
brew install px4-dev
elif [[ $REINSTALL_FORMULAS == "--reinstall" ]]; then
echo
echo "Installing PX4 general dependencies (homebrew px4-dev)"
if [[ $REINSTALL_FORMULAS == "--reinstall" ]]; then
brew tap PX4/px4
brew reinstall px4-dev
elif brew ls --versions px4-dev > /dev/null; then
brew tap PX4/px4
brew install px4-dev
fi
# Python dependencies
sudo easy_install pip
sudo -H python3 -m pip install --upgrade --force-reinstall pip
sudo -H python3 -m pip install -I -r ${DIR}/requirements.txt
# Python3 dependencies
echo
echo "Installing PX4 Python3 dependencies"
brew install python3
sudo -H python3 -m pip install --upgrade pip
sudo -H python3 -m pip install -r ${DIR}/requirements.txt
# Optional, but recommended additional simulation tools:
if [[ $INSTALL_SIM == "--sim-tools" ]]; then
if [ brew ls --versions px4-sim > /dev/null ]; then
if brew ls --versions px4-sim > /dev/null; then
brew install px4-sim
elif [[ $REINSTALL_FORMULAS == "--reinstall" ]]; then
brew reinstall px4-sim

View File

@ -2,6 +2,7 @@ argparse>=1.2
cerberus
empy>=3.3
jinja2>=2.8
matplotlib
nose
numpy>=1.13
pandas>=0.21
@ -12,4 +13,3 @@ setuptools>=39.2.0
toml>=0.9
tornado
wheel>=0.31.1
matplotlib

View File

@ -49,6 +49,7 @@ fi
export DEBIAN_FRONTEND=noninteractive
echo
echo "Installing PX4 general dependencies"
sudo apt-get update -yy --quiet
@ -81,20 +82,16 @@ sudo apt-get -yy --quiet --no-install-recommends install \
;
# python dependencies
echo "Installing PX4 Python dependencies"
# TODO: deprecate python 2
sudo python -m pip install --upgrade pip setuptools wheel
sudo python -m pip install -r ${DIR}/requirements.txt
# Python3 dependencies
echo
echo "Installing PX4 Python3 dependencies"
sudo python3 -m pip install --upgrade pip setuptools wheel
sudo python3 -m pip install -r ${DIR}/requirements.txt
# NuttX toolchain (arm-none-eabi-gcc)
if [[ $INSTALL_NUTTX == "true" ]]; then
echo
echo "Installing NuttX dependencies"
sudo apt-get -yy --quiet --no-install-recommends install \
@ -145,6 +142,7 @@ fi
# Simulation tools
if [[ $INSTALL_SIM == "true" ]]; then
echo
echo "Installing PX4 simulation dependencies"
# java (jmavsim or fastrtps)
@ -156,6 +154,7 @@ if [[ $INSTALL_SIM == "true" ]]; then
# Gazebo
sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
sudo apt-get update -yy --quiet
sudo apt-get -yy --quiet --no-install-recommends install gazebo9