forked from Seeed-Studio/grove.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
124 lines (111 loc) · 5.74 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
'''
## License
The MIT License (MIT)
Grove Base Hat for the Raspberry Pi, used to connect grove sensors.
Copyright (C) 2018 Seeed Technology Co.,Ltd.
'''
import io
from setuptools import setup, find_packages
with open('README.md') as f:
long_description = f.read()
requirements = ['smbus2']
def is_pi():
found = False
try:
with io.open('/proc/cpuinfo', 'r') as cpuinfo:
for line in cpuinfo:
if line.startswith('Hardware'):
_, value = line.strip().split(':', 1)
value = value.strip()
if value in ('BCM2708', 'BCM2709', 'BCM2835', 'BCM2836'):
found = True
except IOError:
pass
return found
if is_pi():
requirements.append('RPi.GPIO')
requirements.append('rpi_ws281x')
setup(
name='grove.py',
version='0.6',
description='Python library for Seeedstudio Grove devices',
long_description=long_description,
long_description_content_type='text/markdown',
author='Yihui Xiong',
author_email='[email protected]',
url='https://github.com/seeed-studio/grove.py',
packages=find_packages(include=['grove']),
include_package_data=True,
install_requires=requirements,
entry_points={
'console_scripts': [
'grove_1wire_thermocouple_amplifier_max31850=grove.grove_1wire_thermocouple_amplifier_max31850:main',
'grove_3_axis_accelerometer_adxl372=grove.grove_3_axis_accelerometer_adxl372:main',
'grove_3_axis_compass_bmm150=grove.grove_3_axis_compass_bmm150:main',
'grove_3_axis_digital_accelerometer=grove.grove_3_axis_digital_accelerometer:main',
'grove_4_digit_display=grove.grove_4_digit_display:main',
'grove_6_axis_accel_gyro_bmi088=grove.grove_6_axis_accel_gyro_bmi088:main',
'grove_12_key_cap_i2c_touch_mpr121=grove.grove_12_key_cap_i2c_touch_mpr121:main',
'grove_16x2_lcd=grove.display.jhd1802:main',
'grove_air_quality_sensor_v1_3=grove.grove_air_quality_sensor_v1_3:main',
'grove_button=grove.grove_button:main',
'grove_cap_touch_slider_cy8c=grove.grove_cap_touch_slider_cy8c:main',
'grove_collision_sensor=grove.grove_collision_sensor:main',
'grove_gesture_sensor=grove.grove_gesture_sensor:main',
'grove_high_accuracy_temperature=grove.grove_high_accuracy_temperature:main',
'grove_i2c_color_sensor_v2=grove.grove_i2c_color_sensor_v2:main',
'grove_i2c_motor_driver=grove.grove_i2c_motor_driver:main',
'grove_i2c_thermocouple_amplifier_mcp9600=grove.grove_i2c_thermocouple_amplifier_mcp9600:main',
'grove_imu_9dof_icm20600_ak09918=grove.grove_imu_9dof_icm20600_ak09918:main',
'grove_lcd_1.2inches=grove.display.sh1107g:main',
'grove_led=grove.grove_led:main',
'grove_light_sensor_v1_2=grove.grove_light_sensor_v1_2:main',
'grove_loudness_sensor=grove.grove_loudness_sensor:main',
'grove_mech_keycap=grove.grove_mech_keycap:main',
'grove_mini_pir_motion_sensor=grove.grove_mini_pir_motion_sensor:main',
'grove_moisture_sensor=grove.grove_moisture_sensor:main',
'grove_multi_switch=grove.grove_multi_switch:main',
'grove_multi_switch_poll=grove.button.button_i2c:main',
'grove_oled_display_128x64=grove.grove_oled_display_128x64:main',
'grove_optical_rotary_encoder=grove.grove_optical_rotary_encoder:main',
'grove_piezo_vibration_sensor=grove.grove_piezo_vibration_sensor:main',
'grove_pwm_buzzer=grove.grove_pwm_buzzer:main',
'grove_recorder_v3_0=grove.grove_recorder_v3_0:main',
'grove_relay=grove.grove_relay:main',
'grove_gpio=grove.grove_gpio:main',
'grove_rotary_angle_sensor=grove.grove_rotary_angle_sensor:main',
'grove_round_force_sensor=grove.grove_round_force_sensor:main',
'grove_ryb_led_button=grove.grove_ryb_led_button:main',
'grove_servo=grove.grove_servo:main',
'grove_slide_potentiometer=grove.grove_slide_potentiometer:main',
'grove_sound_sensor=grove.grove_sound_sensor:main',
'grove_step_counter_bma456=grove.grove_step_counter_bma456:main',
'grove_switch=grove.grove_switch:main',
'grove_temperature_humidity_bme680=grove.grove_temperature_humidity_bme680:main',
'grove_temperature_humidity_sht31=grove.grove_temperature_humidity_sensor_sht3x:main',
'grove_temperature_sensor=grove.grove_temperature_sensor:main',
'grove_thumb_joystick=grove.grove_thumb_joystick:main',
'grove_tilt_switch=grove.grove_tilt_switch:main',
'grove_time_of_flight_distance=grove.grove_time_of_flight_distance:main',
'grove_touch_sensor=grove.grove_touch_sensor:main',
'grove_ultrasonic_ranger=grove.grove_ultrasonic_ranger:main',
'grove_uv_sensor=grove.grove_uv_sensor:main',
'grove_water_sensor=grove.grove_water_sensor:main',
'grove_ws2813_rgb_led_strip=grove.grove_ws2813_rgb_led_strip:main',
'grove_current_sensor=grove.grove_current_sensor:main'
],
},
zip_safe=False,
license = 'MIT',
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: POSIX :: Linux',
"Programming Language :: Python :: 2",
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
],
keywords=['grove'])