Update pyflosetup.sh
This commit is contained in:
parent
e8ae8163ec
commit
46bcd30252
@ -1,21 +1,55 @@
|
||||
#!/bin/bash
|
||||
# Run this setup file to install pyflo dependencies if pyflo is being installed
|
||||
# Update package list
|
||||
|
||||
# =====================
|
||||
# Setup Script for PyFLO
|
||||
# =====================
|
||||
|
||||
# Exit on any error
|
||||
set -e
|
||||
|
||||
# Step 1: Update Package List
|
||||
echo "Updating package list..."
|
||||
sudo apt update
|
||||
|
||||
# Install system dependencies
|
||||
sudo apt install -y build-essential libssl-dev pkg-config python3.7-dev python3-setuptools
|
||||
|
||||
# Step 2: Install System Dependencies
|
||||
echo "Installing system dependencies..."
|
||||
sudo apt install -y build-essential libssl-dev pkg-config python3.7-dev python3-setuptools git
|
||||
|
||||
# Inform the user
|
||||
echo "System dependencies installed successfully."
|
||||
|
||||
# Step 3: Clone the PyFLO Repository
|
||||
if [ ! -d "pyflo" ]; then
|
||||
echo "Cloning the PyFLO repository..."
|
||||
git clone https://github.com/ranchimall/pyflo
|
||||
else
|
||||
echo "PyFLO repository already exists. Skipping clone."
|
||||
fi
|
||||
|
||||
# Step 4: Install Python Dependencies
|
||||
echo "Installing Python dependencies..."
|
||||
if [ ! -f "requirements.txt" ]; then
|
||||
# Generate a requirements.txt file if missing
|
||||
echo "arduino" > requirements.txt
|
||||
# echo "pybtc" >> requirements.txt
|
||||
echo "config" >> requirements.txt
|
||||
echo "Generated requirements.txt with default dependencies."
|
||||
else
|
||||
echo "requirements.txt file exists. Using it for installation."
|
||||
fi
|
||||
|
||||
# Ensure pip is up-to-date
|
||||
pip install --upgrade pip
|
||||
|
||||
# Install Python packages
|
||||
pip install --upgrade pip # Ensure pip is up-to-date
|
||||
pip install --use-pep517 -r requirements.txt
|
||||
|
||||
git clone https://github.com/ranchimall/pyflo
|
||||
# Step 5: Install PyFLO
|
||||
echo "Installing PyFLO..."
|
||||
sudo python3 pyflo/setup.py install
|
||||
|
||||
# Inform the user
|
||||
echo "Python dependencies installed successfully."
|
||||
echo "Python dependencies and PyFLO installed successfully."
|
||||
|
||||
# Step 6: Final Instructions
|
||||
echo "Setup complete! You're ready to use PyFLO."
|
||||
|
||||
Loading…
Reference in New Issue
Block a user