Skip to content

Commit

Permalink
cmake and Tools/setup.sh default to python3
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed May 30, 2019
1 parent f593e3d commit 4b3f68f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 18 deletions.
30 changes: 21 additions & 9 deletions Tools/setup/OSX.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Tools/setup/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ argparse>=1.2
cerberus
empy>=3.3
jinja2>=2.8
matplotlib
nose
numpy>=1.13
pandas>=0.21
Expand All @@ -12,4 +13,3 @@ setuptools>=39.2.0
toml>=0.9
tornado
wheel>=0.31.1
matplotlib
15 changes: 7 additions & 8 deletions Tools/setup/ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ fi

export DEBIAN_FRONTEND=noninteractive

echo
echo "Installing PX4 general dependencies"

sudo apt-get update -yy --quiet
Expand Down Expand Up @@ -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 \
Expand Down Expand Up @@ -145,6 +142,7 @@ fi
# Simulation tools
if [[ $INSTALL_SIM == "true" ]]; then

echo
echo "Installing PX4 simulation dependencies"

# java (jmavsim or fastrtps)
Expand All @@ -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

Expand Down

0 comments on commit 4b3f68f

Please sign in to comment.