File: no-adafruit-board-toolkit.patch

package info (click to toggle)
mu-editor 1.2.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 13,492 kB
  • sloc: python: 33,326; makefile: 154; xml: 32; sh: 7
file content (88 lines) | stat: -rw-r--r-- 3,383 bytes parent folder | download
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
Index: mu-editor/mu/modes/circuitpython.py
===================================================================
--- mu-editor.orig/mu/modes/circuitpython.py
+++ mu-editor/mu/modes/circuitpython.py
@@ -24,7 +24,7 @@ from mu.modes.base import MicroPythonMod
 from mu.modes.api import ADAFRUIT_APIS, SHARED_APIS
 from mu.interface.panes import CHARTS
 from mu.logic import Device
-from adafruit_board_toolkit import circuitpython_serial
+#from adafruit_board_toolkit import circuitpython_serial
 
 logger = logging.getLogger(__name__)
 
@@ -279,33 +279,33 @@ class CircuitPythonMode(MicroPythonMode)
                 self.connected = False
             return wd
 
-    def compatible_board(self, port):
-        """Use adafruit_board_toolkit to find out whether a board is running
-        CircuitPython. The toolkit sees if the CDC Interface name is appropriate.
-        """
-
-        pid = port.productIdentifier()
-        vid = port.vendorIdentifier()
-        manufacturer = port.manufacturer()
-        serial_number = port.serialNumber()
-        port_name = self.port_path(port.portName())
-
-        # Find all the CircuitPython REPL comports,
-        # and see if any of their device names match the one passed in.
-        for comport in circuitpython_serial.repl_comports():
-            if comport.device == port_name:
-                return Device(
-                    vid,
-                    pid,
-                    port_name,
-                    serial_number,
-                    manufacturer,
-                    self.name,
-                    self.short_name,
-                    "CircuitPython board",
-                )
-        # No match.
-        return None
+##    def compatible_board(self, port):
+##        """Use adafruit_board_toolkit to find out whether a board is running
+##        CircuitPython. The toolkit sees if the CDC Interface name is appropriate.
+##        """
+##
+##        pid = port.productIdentifier()
+##        vid = port.vendorIdentifier()
+##        manufacturer = port.manufacturer()
+##        serial_number = port.serialNumber()
+##        port_name = self.port_path(port.portName())
+##
+##        # Find all the CircuitPython REPL comports,
+##        # and see if any of their device names match the one passed in.
+##        for comport in circuitpython_serial.repl_comports():
+##            if comport.device == port_name:
+##                return Device(
+##                    vid,
+##                    pid,
+##                    port_name,
+##                    serial_number,
+##                    manufacturer,
+##                    self.name,
+##                    self.short_name,
+##                    "CircuitPython board",
+##                )
+##        # No match.
+##        return None
 
     def api(self):
         """
Index: mu-editor/setup.py
===================================================================
--- mu-editor.orig/setup.py
+++ mu-editor/setup.py
@@ -48,7 +48,8 @@ install_requires = [
     #
     # adafruit-board-toolkit is used to find serial ports and help identify
     # CircuitPython boards in the CircuitPython mode.
-    "adafruit-board-toolkit~=1.1",
+    # however it is currently missing in Debian
+    #"adafruit-board-toolkit~=1.1",
     "pyserial~=3.5",
     "nudatus>=0.0.3",
     # `flake8` is actually a testing/packaging dependency that, among other