We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d33c0ce commit d51a9ecCopy full SHA for d51a9ec
cap1xxx/__init__.py
@@ -10,15 +10,8 @@
10
import atexit
11
import threading
12
import time
13
-from sys import version_info
14
15
-try:
16
- from smbus import SMBus
17
-except ImportError:
18
- if version_info[0] < 3:
19
- raise ImportError("This library requires python-smbus\nInstall with: sudo apt-get install python-smbus")
20
- elif version_info[0] == 3:
21
- raise ImportError("This library requires python3-smbus\nInstall with: sudo apt-get install python3-smbus")
+from smbus2 import SMBus
22
23
try:
24
import RPi.GPIO as GPIO
pyproject.toml
@@ -35,6 +35,7 @@ classifiers = [
35
"Topic :: System :: Hardware",
36
]
37
dependencies = [
38
+ "smbus2"
39
40
41
[project.urls]
0 commit comments