mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-21 22:48:16 +01:00
Update setup.py
better detection of raspberry pi based cpu for RPi.GPIO
This commit is contained in:
parent
f887d6247b
commit
1652b340fe
1 changed files with 13 additions and 1 deletions
14
setup.py
14
setup.py
|
@ -2,6 +2,18 @@ from setuptools import setup, find_packages
|
|||
from cbpi import __version__
|
||||
import platform
|
||||
|
||||
# read the contents of your README file
|
||||
from os import popen
|
||||
|
||||
localsystem = platform.system()
|
||||
raspberrypi=False
|
||||
if localsystem == "Linux":
|
||||
command="cat /proc/cpuinfo | grep Raspberry"
|
||||
model=popen(command).read()
|
||||
if len(model) != 0:
|
||||
raspberrypi=True
|
||||
|
||||
|
||||
setup(name='cbpi',
|
||||
version=__version__,
|
||||
description='CraftBeerPi',
|
||||
|
@ -37,7 +49,7 @@ setup(name='cbpi',
|
|||
'psutil==5.8.0',
|
||||
'cbpi4ui',
|
||||
'importlib_metadata'] + (
|
||||
['RPi.GPIO==0.7.1a4'] if platform.uname()[1] == "raspberrypi" else [] ) +
|
||||
['RPi.GPIO==0.7.1a4'] if raspberrypi else [] ) +
|
||||
(['numpy==1.22.0'] if (int(platform.python_version_tuple()[1]) >= 9) and (int(platform.python_version_tuple()[0]) == 3) else ['numpy==1.20.3'] ) +
|
||||
(['pandas==1.4.0'] if (int(platform.python_version_tuple()[1]) >= 9) and (int(platform.python_version_tuple()[0]) == 3) else ['pandas==1.1.5'] ),
|
||||
|
||||
|
|
Loading…
Reference in a new issue