Merge pull request #265 from makermelissa/main

This commit is contained in:
Melissa LeBlanc-Williams 2023-10-20 18:21:34 -07:00 committed by GitHub
commit b0028ac12c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 9 deletions

View file

@ -7,19 +7,20 @@ Written in Python by Melissa LeBlanc-Williams for Adafruit Industries
import time import time
import os import os
import sys
try: try:
import click import click
except ImportError: except ImportError:
raise RuntimeError("The library 'Click' was not found. To install, try typing: sudo pip3 install Click") raise RuntimeError("The library 'Click' was not found. To install, try typing: pip3 install Click")
try: try:
from adafruit_shell import Shell from adafruit_shell import Shell
except ImportError: except ImportError:
raise RuntimeError("The library 'adafruit_shell' was not found. To install, try typing: sudo pip3 install adafruit-python-shell") raise RuntimeError("The library 'adafruit_shell' was not found. To install, try typing: pip3 install adafruit-python-shell")
shell = Shell() shell = Shell()
shell.group = 'PITFT' shell.group = 'PITFT'
__version__ = "3.5.0" __version__ = "3.6.0"
""" """
This is the main configuration. Displays should be placed in the order This is the main configuration. Displays should be placed in the order
@ -240,10 +241,8 @@ def softwareinstall():
if not shell.run_command("apt-get install -y tslib"): if not shell.run_command("apt-get install -y tslib"):
if not shell.run_command("apt-get install -y libts-dev"): if not shell.run_command("apt-get install -y libts-dev"):
warn_exit("Apt failed to install TSLIB!") warn_exit("Apt failed to install TSLIB!")
if not shell.run_command("apt-get install -y bc fbi git python3-dev python3-pip python3-smbus python3-spidev evtest libts-bin device-tree-compiler libraspberrypi-dev build-essential"): if not shell.run_command("apt-get install -y bc fbi git python3-dev python3-pip python3-smbus python3-spidev evtest libts-bin device-tree-compiler libraspberrypi-dev build-essential python3-evdev"):
warn_exit("Apt failed to install software!") warn_exit("Apt failed to install software!")
if not shell.run_command("pip3 install evdev"):
warn_exit("Pip failed to install software!")
return True return True
def uninstall_bootconfigtxt(): def uninstall_bootconfigtxt():

View file

@ -81,9 +81,8 @@ def update_python():
shell.run_command("sudo update-alternatives --skip-auto --config python") shell.run_command("sudo update-alternatives --skip-auto --config python")
def update_pip(): def update_pip():
print("Making sure PIP is installed") print("Making sure PIP and setuptools is installed")
shell.run_command("sudo apt-get install -y python3-pip") shell.run_command("sudo apt-get install --upgrade -y python3-pip python3-setuptools")
shell.run_command("sudo pip3 install --upgrade setuptools")
def install_blinka(user=False): def install_blinka(user=False):
print("Installing latest version of Blinka locally") print("Installing latest version of Blinka locally")