pyxcp 0.21.8__cp37-cp37m-win_amd64.whl → 0.21.9__cp37-cp37m-win_amd64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pyxcp might be problematic. Click here for more details.

pyxcp/__init__.py CHANGED
@@ -24,5 +24,5 @@ from .transport import Eth
24
24
  from .transport import SxI
25
25
  from .transport import Usb
26
26
 
27
- # if you update this manually, do not forget to update .bumpversion.cfg
28
- __version__ = "0.21.8"
27
+ # if you update this manually, do not forget to update .bumpversion.cfg and pyproject.toml
28
+ __version__ = "0.21.9"
@@ -8,6 +8,9 @@ from time import perf_counter
8
8
  from time import sleep
9
9
  from time import time
10
10
 
11
+ import usb.backend.libusb1 as libusb1
12
+ import usb.backend.libusb0 as libusb0
13
+ import usb.backend.openusb as openusb
11
14
  import usb.core
12
15
  import usb.util
13
16
 
@@ -29,6 +32,7 @@ class Usb(BaseTransport):
29
32
  "reply_endpoint_number": (int, True, 1),
30
33
  "vendor_id": (int, False, 0),
31
34
  "product_id": (int, False, 0),
35
+ "library": (str, False, "") # absolute path to USB shared library
32
36
  }
33
37
  HEADER = struct.Struct("<2H")
34
38
  HEADER_SIZE = HEADER.size
@@ -43,6 +47,7 @@ class Usb(BaseTransport):
43
47
  self.interface_number = self.config.get("interface_number")
44
48
  self.command_endpoint_number = self.config.get("command_endpoint_number")
45
49
  self.reply_endpoint_number = self.config.get("reply_endpoint_number")
50
+ self.library = self.config.get("library")
46
51
  self.device = None
47
52
 
48
53
  self.status = 0
@@ -55,15 +60,25 @@ class Usb(BaseTransport):
55
60
  self._packets = deque()
56
61
 
57
62
  def connect(self):
63
+ if self.library:
64
+ for backend_provider in (libusb1, libusb0, openusb):
65
+ backend = backend_provider.get_backend(find_library=lambda x: self.library)
66
+ if backend:
67
+ break
68
+ else:
69
+ backend = None
70
+
58
71
  if self.vendor_id and self.product_id:
59
72
  kwargs = {
60
73
  "find_all": True,
61
74
  "idVendor": self.vendor_id,
62
75
  "idProduct": self.product_id,
76
+ "backend": backend,
63
77
  }
64
78
  else:
65
79
  kwargs = {
66
80
  "find_all": True,
81
+ "backend": backend,
67
82
  }
68
83
 
69
84
  for device in usb.core.find(**kwargs):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyxcp
3
- Version: 0.21.8
3
+ Version: 0.21.9
4
4
  Summary: Universal Calibration Protocol for Python
5
5
  Keywords: automotive,ecu,xcp,asam,autosar
6
6
  Author: Christoph Schueler
@@ -1,4 +1,4 @@
1
- pyxcp/__init__.py,sha256=Gza2IKJ0jQ8RvJXYYeijCeDKYwc-7u_vlN1Qjm3JYI0,727
1
+ pyxcp/__init__.py,sha256=ZX9y5UF2dvHjSpwztOnczBmD28aII5Qu6Xts6pWZxuA,746
2
2
  pyxcp/aml/EtasCANMonitoring.a2l,sha256=hEHpb3GpuFDvU6GpAiuV028mu7MUXtfE7wslPA0GlZg,1640
3
3
  pyxcp/aml/EtasCANMonitoring.aml,sha256=xl0DdyeiIaLW0mmmJNAyJS0CQdOLSxt9dxfgrdSlU8Y,2405
4
4
  pyxcp/aml/ifdata_CAN.a2l,sha256=mQFDM6y9qyxUORYR1L0m8fMJ7S1oGheuD8ouEeYxEnI,614
@@ -134,14 +134,14 @@ pyxcp/transport/cxx_ext/tests/test_pool.cpp,sha256=vztxjVtzXXoTKWt4KHoiTN-UpjGMH
134
134
  pyxcp/transport/cxx_ext/tests/test_timestamp.cpp,sha256=6V_rZJR9rtQgIO-CFdFIWSx7iAUga2C9BRr5TBJXgNc,540
135
135
  pyxcp/transport/eth.py,sha256=PoCafj5BF1Ir0SLEvscZivXTEihGJPo7EAgYq5WHvok,7923
136
136
  pyxcp/transport/sxi.py,sha256=VVqiXD800GociBryMtXma9l2QspQpwECE1eNy4Cq4us,2583
137
- pyxcp/transport/usb_transport.py,sha256=ho8-i3mbVtBAp6uRdTytO0-EQpifZHHbKY-2CwRcw54,7284
137
+ pyxcp/transport/usb_transport.py,sha256=hK4FTl1DM7xDoNjcBXoMeb-YZfk2SP3BihlbJM6mL2w,7888
138
138
  pyxcp/types.py,sha256=uV-f4XlG1IjqeIT8PGUnb5CwEBcX10JQ7aDt3gWJrwk,24950
139
139
  pyxcp/utils.py,sha256=b7zNSMLOYhgKBHXQSDbSfGYzhgXlje_xsJK0LztdNTk,1960
140
140
  pyxcp/vector/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
141
141
  pyxcp/vector/map.py,sha256=5FPdKgvP5CKuas2R5PIsxUvip-bVp7kwrEcQAZjZcAw,2369
142
- rekorder.cp37-win_amd64.pyd,sha256=OqD8KlJC88ivgMnn02kGJUDTVdi05siy90Shr5p201M,166912
143
- pyxcp-0.21.8.dist-info/entry_points.txt,sha256=wL4Cgx0wIAbuEr93nPewLCL-6DCSunxxTkui-bibme8,219
144
- pyxcp-0.21.8.dist-info/WHEEL,sha256=_llgsvQOUPbkD8zOjRZqJugQwNd6Myf-dMs3fMQiQFQ,96
145
- pyxcp-0.21.8.dist-info/METADATA,sha256=99IqeBNXYcdUXdQoHgKtBcqNU9aSZFAGU-m3lMnjKIE,3861
146
- pyxcp-0.21.8.dist-info/licenses/LICENSE,sha256=fTqV5eBpeAZO0_jit8j4Ref9ikBSlHJ8xwj5TLg7gFk,7817
147
- pyxcp-0.21.8.dist-info/RECORD,,
142
+ rekorder.cp37-win_amd64.pyd,sha256=PgyugBJc8fZm0g-93zpy5Di6KWI87N4QBm9YkrADcc4,166912
143
+ pyxcp-0.21.9.dist-info/entry_points.txt,sha256=wL4Cgx0wIAbuEr93nPewLCL-6DCSunxxTkui-bibme8,219
144
+ pyxcp-0.21.9.dist-info/WHEEL,sha256=_llgsvQOUPbkD8zOjRZqJugQwNd6Myf-dMs3fMQiQFQ,96
145
+ pyxcp-0.21.9.dist-info/METADATA,sha256=9SEGwDGqBqsFd_2HpxNHjbV6C4I4iwgJx1XhjQmFtGE,3861
146
+ pyxcp-0.21.9.dist-info/licenses/LICENSE,sha256=fTqV5eBpeAZO0_jit8j4Ref9ikBSlHJ8xwj5TLg7gFk,7817
147
+ pyxcp-0.21.9.dist-info/RECORD,,
Binary file
File without changes