diff --git a/setup.py b/setup.py index e773530..99d5137 100644 --- a/setup.py +++ b/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'] ),