Detect platform
This commit is contained in:
parent
d1c4b36398
commit
8bb4c14351
1 changed files with 9 additions and 6 deletions
|
@ -1,16 +1,19 @@
|
|||
import sys
|
||||
from setuptools import setup
|
||||
|
||||
dependencies = ['Pillow', 'numpy']
|
||||
|
||||
if os.path.exists('/sys/bus/platform/drivers/gpiomem-bcm2835'):
|
||||
dependencies.extend(['RPi.GPIO', 'spidev'])
|
||||
else:
|
||||
dependencies.extend(['Jetson.GPIO', 'smbus'])
|
||||
|
||||
setup(
|
||||
name='waveshare-epd',
|
||||
description='Waveshare e-Paper Display',
|
||||
author='Waveshare',
|
||||
package_dir={'': 'lib'},
|
||||
packages=['waveshare_epd'],
|
||||
install_requires=[
|
||||
'RPi.GPIO',
|
||||
'spidev',
|
||||
'Pillow',
|
||||
'numpy'
|
||||
],
|
||||
install_requires=dependencies,
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue