Преглед изворни кода

Merge pull request #149 from missionfloyd/missionfloyd-install_requires

Add dependencies to setup.py
SSYYL пре 4 година
родитељ
комит
af9694c602
1 измењених фајлова са 10 додато и 1 уклоњено
  1. 10 1
      RaspberryPi_JetsonNano/python/setup.py

+ 10 - 1
RaspberryPi_JetsonNano/python/setup.py

@@ -1,10 +1,19 @@
-import sys
+import sys, os
 from setuptools import setup
+
+dependencies = ['Pillow', 'numpy']
+
+if os.path.exists('/sys/bus/platform/drivers/gpiomem-bcm2835'):
+    dependencies += ['RPi.GPIO', 'spidev']
+else:
+    dependencies += ['Jetson.GPIO']
+
 setup(
     name='waveshare-epd',
     description='Waveshare e-Paper Display',
     author='Waveshare',
     package_dir={'': 'lib'},
     packages=['waveshare_epd'],
+    install_requires=dependencies,
 )