mirror of
https://gitlab.com/veilid/veilid.git
synced 2024-11-22 08:56:58 -06:00
Dev setup for macOS: If pip3 installation fails, Homebrew is tried as a fallback if the user installed Python through Homebrew
This commit is contained in:
parent
5a4a06d14e
commit
048dbe476b
@ -156,8 +156,21 @@ rustup target add aarch64-apple-darwin aarch64-apple-ios aarch64-apple-ios-sim x
|
|||||||
# install cargo packages
|
# install cargo packages
|
||||||
cargo install wasm-bindgen-cli wasm-pack cargo-edit
|
cargo install wasm-bindgen-cli wasm-pack cargo-edit
|
||||||
|
|
||||||
# install pip packages
|
# attempt to install pip packages - this may result in an error, which we will try to catch
|
||||||
pip3 install --upgrade bumpversion
|
pip3 install --upgrade bumpversion || ( \
|
||||||
|
if [ $? -gt 0 ]; then
|
||||||
|
# it was probably because of the Python installation being externally managed, so we'll try to get the package via Homebrew, but only if Python was installed from there
|
||||||
|
echo "Installation via pip3 failed. Checking if Python was installed via Homebrew..."
|
||||||
|
if [[ ! -z $(brew list | grep python) ]]; then
|
||||||
|
echo "Python was installed from Homebrew. Installing bumpversion..."
|
||||||
|
$BREW_COMMAND install bumpversion && \
|
||||||
|
echo "[X] Bumpversion Python package installed" || \
|
||||||
|
echo "Failed to install the bumpversion Python package. Please install manually."
|
||||||
|
else
|
||||||
|
echo "Python was not installed from Homebrew. Please install the "bumpversion" Python package manually."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
)
|
||||||
|
|
||||||
if command -v pod &>/dev/null; then
|
if command -v pod &>/dev/null; then
|
||||||
echo '[X] CocoaPods is available in the path'
|
echo '[X] CocoaPods is available in the path'
|
||||||
|
Loading…
Reference in New Issue
Block a user