mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-30 18:06:39 +08:00
setup: clean up macOS setup script
- Spaces -> tabs. - Remove "brew install python" because it's already a dependency of the px4-dev tap. - Remove "brew install ccache" as we can also add it to the px4-dev tap. - Don't try to update pip installation, it works fine as is. - Install pip dependencies as user, no need for system-wide install.
This commit is contained in:
+4
-12
@@ -29,28 +29,20 @@ if [[ $REINSTALL_FORMULAS == "--reinstall" ]]; then
|
|||||||
brew doctor
|
brew doctor
|
||||||
|
|
||||||
brew tap PX4/px4
|
brew tap PX4/px4
|
||||||
brew reinstall px4-dev ccache
|
brew reinstall px4-dev
|
||||||
|
|
||||||
# python dependencies
|
|
||||||
brew install python3
|
|
||||||
sudo -H python3 -m pip install --upgrade pip
|
|
||||||
else
|
else
|
||||||
if brew ls --versions px4-dev > /dev/null; then
|
if brew ls --versions px4-dev > /dev/null; then
|
||||||
echo "px4-dev already installed"
|
echo "px4-dev already installed"
|
||||||
else
|
else
|
||||||
echo "Installing PX4 general dependencies (homebrew px4-dev)"
|
echo "Installing PX4 general dependencies (homebrew px4-dev)"
|
||||||
brew tap PX4/px4
|
brew tap PX4/px4
|
||||||
brew install px4-dev ccache
|
brew install px4-dev
|
||||||
|
|
||||||
# python dependencies
|
|
||||||
brew install python3
|
|
||||||
sudo -H python3 -m pip install --upgrade pip
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Python3 dependencies
|
# Python dependencies
|
||||||
echo "Installing PX4 Python3 dependencies"
|
echo "Installing PX4 Python3 dependencies"
|
||||||
sudo -H python3 -m pip install -r ${DIR}/requirements.txt
|
pip3 install --user -r ${DIR}/requirements.txt
|
||||||
|
|
||||||
# Optional, but recommended additional simulation tools:
|
# Optional, but recommended additional simulation tools:
|
||||||
if [[ $INSTALL_SIM == "--sim-tools" ]]; then
|
if [[ $INSTALL_SIM == "--sim-tools" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user