Update setup.py

RPi.GPIO installation only if system is based on raspberrypi
This commit is contained in:
avollkopf 2021-10-09 10:53:40 +02:00
parent 45c084360f
commit a81a365113

View file

@ -1,5 +1,6 @@
from setuptools import setup, find_packages from setuptools import setup, find_packages
from cbpi import __version__ from cbpi import __version__
import platform
setup(name='cbpi', setup(name='cbpi',
version=__version__, version=__version__,
@ -37,9 +38,9 @@ setup(name='cbpi',
'psutil==5.8.0', 'psutil==5.8.0',
'numpy==1.20.3', 'numpy==1.20.3',
'scipy', 'scipy',
'cbpi4ui', 'cbpi4ui'] + (
'RPi.GPIO; sys_platform == "linux"' ['RPi.GPIO'] if platform.uname()[1] == "raspberrypi" else [] ),
],
dependency_links=[ dependency_links=[
'https://testpypi.python.org/pypi', 'https://testpypi.python.org/pypi',