libusb 1.0.27__zip → 1.0.27.post2__zip
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.
- {libusb-1.0.27 → libusb-1.0.27.post2}/.readthedocs.yml +1 -1
- {libusb-1.0.27 → libusb-1.0.27.post2}/CHANGES.rst +12 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/MANIFEST.in +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/PKG-INFO +30 -17
- {libusb-1.0.27 → libusb-1.0.27.post2}/README.rst +4 -3
- {libusb-1.0.27 → libusb-1.0.27.post2}/docs/conf.py +1 -1
- libusb-1.0.27.post2/examples/_win32.py +149 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/examples/dpfp.py +2 -3
- {libusb-1.0.27 → libusb-1.0.27.post2}/examples/dpfp_threaded.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/examples/ezusb.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/examples/fxload.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/examples/hotplugtest.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/examples/listdevs.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/examples/sam3u_benchmark.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/examples/testlibusb.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/examples/xusb.py +2 -3
- {libusb-1.0.27 → libusb-1.0.27.post2}/pyproject.toml +35 -36
- libusb-1.0.27.post2/src/libusb/__about__.py +4 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/__init__.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_config.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_dll.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_libusb.py +581 -591
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/__init__.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_linux/__init__.py +2 -3
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_macos/__init__.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_windows/__init__.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb.egg-info/PKG-INFO +30 -17
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb.egg-info/SOURCES.txt +2 -2
- libusb-1.0.27.post2/src/libusb.egg-info/requires.txt +16 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/tests/__init__.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/tests/__main__.py +1 -2
- libusb-1.0.27.post2/tests/_win32.py +149 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/tests/test_main.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/tests/testlib.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/tests/tman_init_context.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/tests/tman_set_option.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/tests/tman_stress.py +1 -2
- {libusb-1.0.27 → libusb-1.0.27.post2}/tests/tman_stress_mt.py +2 -3
- {libusb-1.0.27 → libusb-1.0.27.post2}/tests/umockdev.py_ +1 -2
- libusb-1.0.27/examples/win32.py +0 -81
- libusb-1.0.27/src/libusb/__about__.py +0 -6
- libusb-1.0.27/src/libusb.egg-info/requires.txt +0 -16
- libusb-1.0.27/tests/win32.py +0 -81
- {libusb-1.0.27 → libusb-1.0.27.post2}/LICENSE +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/docs/CHANGES.rst +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/docs/README.rst +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/docs/_static/libusb.png +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/docs/_templates/.keep +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/docs/index.rst +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/setup.cfg +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/__config__.py +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_linux/aarch64/libusb-1.0.so +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_linux/x64/libusb-1.0.so +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_linux/x86/libusb-1.0.so +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_macos/x64/10.7/libusb-1.0.0.dylib +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_macos/x64/11.6/libusb-1.0.0.dylib +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_macos/x86/.keep +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_windows/x64/libusb-1.0.dll +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_windows/x86/libusb-1.0.dll +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/libusb.cfg +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb.egg-info/dependency_links.txt +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb.egg-info/not-zip-safe +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb.egg-info/top_level.txt +0 -0
- {libusb-1.0.27 → libusb-1.0.27.post2}/tests/data/.keep +0 -0
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
Changelog
|
|
2
2
|
=========
|
|
3
3
|
|
|
4
|
+
1.0.27.post2 (2024-09-30)
|
|
5
|
+
-------------------------
|
|
6
|
+
- Drop support for Python 3.8
|
|
7
|
+
- Setup (dependencies) update.
|
|
8
|
+
|
|
9
|
+
1.0.27.post1 (2024-08-13)
|
|
10
|
+
-------------------------
|
|
11
|
+
- Add support for Python 3.13
|
|
12
|
+
- Setup (dependencies) update.
|
|
13
|
+
- Improvements and cleanup for win32.
|
|
14
|
+
- Source code refactoring and cleanup.
|
|
15
|
+
|
|
4
16
|
1.0.27 (2024-02-05)
|
|
5
17
|
-------------------
|
|
6
18
|
- | The API has been fully updated to version 1.0.27 (libusb v.1.0.27
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: libusb
|
|
3
|
-
Version: 1.0.27
|
|
3
|
+
Version: 1.0.27.post2
|
|
4
4
|
Summary: Python binding for the libusb C library.
|
|
5
5
|
Author: Adam Karpierz
|
|
6
6
|
Author-email: adam@karpierz.net
|
|
@@ -21,32 +21,32 @@ Classifier: Operating System :: OS Independent
|
|
|
21
21
|
Classifier: Natural Language :: Polish
|
|
22
22
|
Classifier: Programming Language :: Python
|
|
23
23
|
Classifier: Programming Language :: Python :: 3
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
25
24
|
Classifier: Programming Language :: Python :: 3.9
|
|
26
25
|
Classifier: Programming Language :: Python :: 3.10
|
|
27
26
|
Classifier: Programming Language :: Python :: 3.11
|
|
28
27
|
Classifier: Programming Language :: Python :: 3.12
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
29
29
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
30
30
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
31
31
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
32
32
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
33
|
-
Requires-Python: <4.0.0,>=3.
|
|
33
|
+
Requires-Python: <4.0.0,>=3.9.0
|
|
34
34
|
Description-Content-Type: text/x-rst; charset=UTF-8
|
|
35
35
|
License-File: LICENSE
|
|
36
|
-
Requires-Dist: setuptools>=
|
|
37
|
-
Requires-Dist: pkg-about>=1.
|
|
36
|
+
Requires-Dist: setuptools>=75.1.0
|
|
37
|
+
Requires-Dist: pkg-about>=1.2.0
|
|
38
38
|
Provides-Extra: doc
|
|
39
|
-
Requires-Dist: Sphinx>=7.
|
|
40
|
-
Requires-Dist: sphinx-toolbox>=3.
|
|
41
|
-
Requires-Dist: sphinx-tabs>=3.4.
|
|
42
|
-
Requires-Dist: sphinx-copybutton>=0.5.
|
|
43
|
-
Requires-Dist: sphinxcontrib-spelling>=
|
|
44
|
-
Requires-Dist: sphinx-lint>=0.
|
|
39
|
+
Requires-Dist: Sphinx>=7.4.7; extra == "doc"
|
|
40
|
+
Requires-Dist: sphinx-toolbox>=3.8.0; extra == "doc"
|
|
41
|
+
Requires-Dist: sphinx-tabs>=3.4.5; extra == "doc"
|
|
42
|
+
Requires-Dist: sphinx-copybutton>=0.5.2; extra == "doc"
|
|
43
|
+
Requires-Dist: sphinxcontrib-spelling>=8.0.0; extra == "doc"
|
|
44
|
+
Requires-Dist: sphinx-lint>=1.0.0; extra == "doc"
|
|
45
45
|
Requires-Dist: restructuredtext-lint>=1.4.0; extra == "doc"
|
|
46
|
-
Requires-Dist: nbsphinx>=0.
|
|
46
|
+
Requires-Dist: nbsphinx>=0.9.5; extra == "doc"
|
|
47
47
|
Provides-Extra: test
|
|
48
|
-
Requires-Dist: deepdiff>=
|
|
49
|
-
Requires-Dist: rich>=13.
|
|
48
|
+
Requires-Dist: deepdiff>=8.0.1; extra == "test"
|
|
49
|
+
Requires-Dist: rich>=13.8.1; extra == "test"
|
|
50
50
|
|
|
51
51
|
libusb
|
|
52
52
|
======
|
|
@@ -125,10 +125,10 @@ Installation
|
|
|
125
125
|
|
|
126
126
|
Prerequisites:
|
|
127
127
|
|
|
128
|
-
+ Python 3.
|
|
128
|
+
+ Python 3.9 or higher
|
|
129
129
|
|
|
130
130
|
* https://www.python.org/
|
|
131
|
-
* with C libusb 1.0.
|
|
131
|
+
* with C libusb 1.0.27 is a primary test environment.
|
|
132
132
|
|
|
133
133
|
+ pip and setuptools
|
|
134
134
|
|
|
@@ -175,7 +175,7 @@ or on development mode:
|
|
|
175
175
|
License
|
|
176
176
|
=======
|
|
177
177
|
|
|
178
|
-
|
|
|
178
|
+
| |copyright|
|
|
179
179
|
| Licensed under the zlib/libpng License
|
|
180
180
|
| https://opensource.org/license/zlib
|
|
181
181
|
| Please refer to the accompanying LICENSE file.
|
|
@@ -187,6 +187,7 @@ Authors
|
|
|
187
187
|
|
|
188
188
|
.. |package| replace:: libusb
|
|
189
189
|
.. |package_bold| replace:: **libusb**
|
|
190
|
+
.. |copyright| replace:: Copyright (c) 2016-2024 Adam Karpierz
|
|
190
191
|
.. |respository| replace:: https://github.com/karpierz/libusb.git
|
|
191
192
|
.. _Development page: https://github.com/karpierz/libusb
|
|
192
193
|
.. _PyPI record: https://pypi.org/project/libusb/
|
|
@@ -196,6 +197,18 @@ Authors
|
|
|
196
197
|
Changelog
|
|
197
198
|
=========
|
|
198
199
|
|
|
200
|
+
1.0.27.post2 (2024-09-30)
|
|
201
|
+
-------------------------
|
|
202
|
+
- Drop support for Python 3.8
|
|
203
|
+
- Setup (dependencies) update.
|
|
204
|
+
|
|
205
|
+
1.0.27.post1 (2024-08-13)
|
|
206
|
+
-------------------------
|
|
207
|
+
- Add support for Python 3.13
|
|
208
|
+
- Setup (dependencies) update.
|
|
209
|
+
- Improvements and cleanup for win32.
|
|
210
|
+
- Source code refactoring and cleanup.
|
|
211
|
+
|
|
199
212
|
1.0.27 (2024-02-05)
|
|
200
213
|
-------------------
|
|
201
214
|
- | The API has been fully updated to version 1.0.27 (libusb v.1.0.27
|
|
@@ -75,10 +75,10 @@ Installation
|
|
|
75
75
|
|
|
76
76
|
Prerequisites:
|
|
77
77
|
|
|
78
|
-
+ Python 3.
|
|
78
|
+
+ Python 3.9 or higher
|
|
79
79
|
|
|
80
80
|
* https://www.python.org/
|
|
81
|
-
* with C libusb 1.0.
|
|
81
|
+
* with C libusb 1.0.27 is a primary test environment.
|
|
82
82
|
|
|
83
83
|
+ pip and setuptools
|
|
84
84
|
|
|
@@ -125,7 +125,7 @@ or on development mode:
|
|
|
125
125
|
License
|
|
126
126
|
=======
|
|
127
127
|
|
|
128
|
-
|
|
|
128
|
+
| |copyright|
|
|
129
129
|
| Licensed under the zlib/libpng License
|
|
130
130
|
| https://opensource.org/license/zlib
|
|
131
131
|
| Please refer to the accompanying LICENSE file.
|
|
@@ -137,6 +137,7 @@ Authors
|
|
|
137
137
|
|
|
138
138
|
.. |package| replace:: libusb
|
|
139
139
|
.. |package_bold| replace:: **libusb**
|
|
140
|
+
.. |copyright| replace:: Copyright (c) 2016-2024 Adam Karpierz
|
|
140
141
|
.. |respository| replace:: https://github.com/karpierz/libusb.git
|
|
141
142
|
.. _Development page: https://github.com/karpierz/libusb
|
|
142
143
|
.. _PyPI record: https://pypi.org/project/libusb/
|
|
@@ -34,7 +34,7 @@ release = about.__version__
|
|
|
34
34
|
|
|
35
35
|
# If your documentation needs a minimal Sphinx version, state it here.
|
|
36
36
|
#
|
|
37
|
-
needs_sphinx = '
|
|
37
|
+
needs_sphinx = '7.4.7'
|
|
38
38
|
|
|
39
39
|
# Add any Sphinx extension module names here, as strings. They can be
|
|
40
40
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
# Copyright (c) 2013 Adam Karpierz
|
|
2
|
+
# SPDX-License-Identifier: Zlib
|
|
3
|
+
|
|
4
|
+
import ctypes
|
|
5
|
+
from ctypes import windll
|
|
6
|
+
from ctypes import wintypes
|
|
7
|
+
from ctypes import WINFUNCTYPE
|
|
8
|
+
from ctypes.wintypes import (
|
|
9
|
+
CHAR, WCHAR, BOOLEAN, BOOL, BYTE, WORD, DWORD, SHORT, USHORT, INT,
|
|
10
|
+
UINT, LONG, ULONG, LARGE_INTEGER, ULARGE_INTEGER, FLOAT, DOUBLE,
|
|
11
|
+
LPBYTE, PBYTE, LPWORD, PWORD, LPDWORD, PDWORD, LPLONG, PLONG, LPSTR,
|
|
12
|
+
LPCSTR, LPVOID, LPCVOID, LPVOID as PVOID, HANDLE, LPHANDLE, PHANDLE,
|
|
13
|
+
WPARAM, LPARAM, FILETIME, LPFILETIME,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
from ctypes.wintypes import WPARAM as ULONG_PTR # workaround
|
|
17
|
+
PULONG_PTR = ctypes.POINTER(ULONG_PTR)
|
|
18
|
+
|
|
19
|
+
ULONG32 = ctypes.c_uint32
|
|
20
|
+
ULONGLONG = ctypes.c_uint64
|
|
21
|
+
DWORDLONG = ctypes.c_uint64
|
|
22
|
+
SIZE_T = ctypes.c_size_t
|
|
23
|
+
|
|
24
|
+
WAIT_ABANDONED = 0x00000080
|
|
25
|
+
WAIT_OBJECT_0 = 0x00000000
|
|
26
|
+
WAIT_TIMEOUT = 0x00000102
|
|
27
|
+
WAIT_FAILED = 0xFFFFFFFF
|
|
28
|
+
|
|
29
|
+
IGNORE = 0
|
|
30
|
+
INFINITE = 0xFFFFFFFF
|
|
31
|
+
|
|
32
|
+
FORMAT_MESSAGE_ALLOCATE_BUFFER = 0x00000100
|
|
33
|
+
FORMAT_MESSAGE_ARGUMENT_ARRAY = 0x00002000
|
|
34
|
+
FORMAT_MESSAGE_FROM_HMODULE = 0x00000800
|
|
35
|
+
FORMAT_MESSAGE_FROM_STRING = 0x00000400
|
|
36
|
+
FORMAT_MESSAGE_FROM_SYSTEM = 0x00001000
|
|
37
|
+
FORMAT_MESSAGE_IGNORE_INSERTS = 0x00000200
|
|
38
|
+
FORMAT_MESSAGE_MAX_WIDTH_MASK = 0x000000FF
|
|
39
|
+
|
|
40
|
+
GetCurrentProcess = windll.kernel32.GetCurrentProcess
|
|
41
|
+
GetCurrentProcess.restype = HANDLE
|
|
42
|
+
GetCurrentProcess.argtypes = []
|
|
43
|
+
|
|
44
|
+
GetProcessTimes = windll.kernel32.GetProcessTimes
|
|
45
|
+
GetProcessTimes.restype = BOOL
|
|
46
|
+
GetProcessTimes.argtypes = [HANDLE,
|
|
47
|
+
LPFILETIME,
|
|
48
|
+
LPFILETIME,
|
|
49
|
+
LPFILETIME,
|
|
50
|
+
LPFILETIME]
|
|
51
|
+
|
|
52
|
+
class SECURITY_ATTRIBUTES(ctypes.Structure):
|
|
53
|
+
_fields_ = [
|
|
54
|
+
("nLength", DWORD),
|
|
55
|
+
("lpSecurityDescriptor", LPVOID),
|
|
56
|
+
("bInheritHandle", BOOL),
|
|
57
|
+
]
|
|
58
|
+
LPSECURITY_ATTRIBUTES = ctypes.POINTER(SECURITY_ATTRIBUTES)
|
|
59
|
+
|
|
60
|
+
LPTHREAD_START_ROUTINE = WINFUNCTYPE(DWORD, LPVOID)
|
|
61
|
+
CreateThread = windll.kernel32.CreateThread
|
|
62
|
+
CreateThread.restype = HANDLE
|
|
63
|
+
CreateThread.argtypes = [LPSECURITY_ATTRIBUTES,
|
|
64
|
+
SIZE_T,
|
|
65
|
+
LPTHREAD_START_ROUTINE,
|
|
66
|
+
LPVOID,
|
|
67
|
+
DWORD,
|
|
68
|
+
LPDWORD]
|
|
69
|
+
|
|
70
|
+
WaitForSingleObject = windll.kernel32.WaitForSingleObject
|
|
71
|
+
WaitForSingleObject.restype = DWORD
|
|
72
|
+
WaitForSingleObject.argtypes = [HANDLE,
|
|
73
|
+
DWORD]
|
|
74
|
+
|
|
75
|
+
SetEvent = windll.kernel32.SetEvent
|
|
76
|
+
SetEvent.restype = BOOL
|
|
77
|
+
SetEvent.argtypes = [HANDLE]
|
|
78
|
+
|
|
79
|
+
CreateSemaphore = windll.kernel32.CreateSemaphoreA
|
|
80
|
+
CreateSemaphore.restype = HANDLE
|
|
81
|
+
CreateSemaphore.argtypes = [LPSECURITY_ATTRIBUTES,
|
|
82
|
+
LONG,
|
|
83
|
+
LONG,
|
|
84
|
+
LPCSTR]
|
|
85
|
+
|
|
86
|
+
ReleaseSemaphore = windll.kernel32.ReleaseSemaphore
|
|
87
|
+
ReleaseSemaphore.restype = BOOL
|
|
88
|
+
ReleaseSemaphore.argtypes = [HANDLE,
|
|
89
|
+
LONG,
|
|
90
|
+
LPLONG]
|
|
91
|
+
|
|
92
|
+
Sleep = windll.kernel32.Sleep
|
|
93
|
+
Sleep.restype = None
|
|
94
|
+
Sleep.argtypes = [DWORD]
|
|
95
|
+
|
|
96
|
+
PHANDLER_ROUTINE = WINFUNCTYPE(BOOL, DWORD)
|
|
97
|
+
SetConsoleCtrlHandler = windll.kernel32.SetConsoleCtrlHandler
|
|
98
|
+
SetConsoleCtrlHandler.restype = BOOL
|
|
99
|
+
SetConsoleCtrlHandler.argtypes = [PHANDLER_ROUTINE,
|
|
100
|
+
BOOL]
|
|
101
|
+
|
|
102
|
+
CloseHandle = windll.kernel32.CloseHandle
|
|
103
|
+
CloseHandle.restype = BOOL
|
|
104
|
+
CloseHandle.argtypes = [HANDLE]
|
|
105
|
+
|
|
106
|
+
GetLastError = windll.kernel32.GetLastError
|
|
107
|
+
GetLastError.restype = DWORD
|
|
108
|
+
GetLastError.argtypes = []
|
|
109
|
+
|
|
110
|
+
FormatMessageA = windll.kernel32.FormatMessageA
|
|
111
|
+
FormatMessageA.restype = DWORD
|
|
112
|
+
FormatMessageA.argtypes = [DWORD,
|
|
113
|
+
LPCVOID,
|
|
114
|
+
DWORD,
|
|
115
|
+
DWORD,
|
|
116
|
+
LPSTR,
|
|
117
|
+
DWORD,
|
|
118
|
+
LPVOID]
|
|
119
|
+
|
|
120
|
+
class SYSTEMTIME(ctypes.Structure):
|
|
121
|
+
_fields_ = [
|
|
122
|
+
("wYear", WORD),
|
|
123
|
+
("wMonth", WORD),
|
|
124
|
+
("wDayOfWeek", WORD),
|
|
125
|
+
("wDay", WORD),
|
|
126
|
+
("wHour", WORD),
|
|
127
|
+
("wMinute", WORD),
|
|
128
|
+
("wSecond", WORD),
|
|
129
|
+
("wMilliseconds", WORD),
|
|
130
|
+
]
|
|
131
|
+
LPSYSTEMTIME = ctypes.POINTER(SYSTEMTIME)
|
|
132
|
+
|
|
133
|
+
GetLocalTime = windll.kernel32.GetLocalTime
|
|
134
|
+
GetLocalTime.restype = None
|
|
135
|
+
GetLocalTime.argtypes = [LPSYSTEMTIME]
|
|
136
|
+
|
|
137
|
+
SetLocalTime = windll.kernel32.SetLocalTime
|
|
138
|
+
SetLocalTime.restype = BOOL
|
|
139
|
+
SetLocalTime.argtypes = [LPSYSTEMTIME]
|
|
140
|
+
|
|
141
|
+
GetSystemTime = windll.kernel32.GetSystemTime
|
|
142
|
+
GetSystemTime.restype = None
|
|
143
|
+
GetSystemTime.argtypes = [LPSYSTEMTIME]
|
|
144
|
+
|
|
145
|
+
SetSystemTime = windll.kernel32.SetSystemTime
|
|
146
|
+
SetSystemTime.restype = BOOL
|
|
147
|
+
SetSystemTime.argtypes = [LPSYSTEMTIME]
|
|
148
|
+
|
|
149
|
+
del ctypes
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2016 Adam Karpierz
|
|
2
|
-
#
|
|
3
|
-
# https://opensource.org/license/zlib
|
|
2
|
+
# SPDX-License-Identifier: Zlib
|
|
4
3
|
|
|
5
4
|
# libusb example program to manipulate U.are.U 4000B fingerprint scanner.
|
|
6
5
|
# Copyright © 2007 Daniel Drake <dsd@gentoo.org>
|
|
@@ -32,7 +31,7 @@ import ctypes as ct
|
|
|
32
31
|
|
|
33
32
|
import libusb as usb
|
|
34
33
|
from libusb._platform import defined, is_posix, is_windows
|
|
35
|
-
if is_windows: import win32
|
|
34
|
+
if is_windows: import _win32 as win32
|
|
36
35
|
|
|
37
36
|
usb_strerror = lambda r: usb.strerror(r).decode("utf-8")
|
|
38
37
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2016 Adam Karpierz
|
|
2
|
-
#
|
|
3
|
-
# https://opensource.org/license/zlib
|
|
2
|
+
# SPDX-License-Identifier: Zlib
|
|
4
3
|
|
|
5
4
|
# libusb example program to manipulate U.are.U 4000B fingerprint scanner.
|
|
6
5
|
# Copyright © 2007 Daniel Drake <dsd@gentoo.org>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2016 Adam Karpierz
|
|
2
|
-
#
|
|
3
|
-
# https://opensource.org/license/zlib
|
|
2
|
+
# SPDX-License-Identifier: Zlib
|
|
4
3
|
|
|
5
4
|
# Copyright © 2001 Stephen Williams (steve@icarus.com)
|
|
6
5
|
# Copyright © 2001-2002 David Brownell (dbrownell@users.sourceforge.net)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2016 Adam Karpierz
|
|
2
|
-
#
|
|
3
|
-
# https://opensource.org/license/zlib
|
|
2
|
+
# SPDX-License-Identifier: Zlib
|
|
4
3
|
|
|
5
4
|
# Copyright © 2001 Stephen Williams (steve@icarus.com)
|
|
6
5
|
# Copyright © 2001-2002 David Brownell (dbrownell@users.sourceforge.net)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2016 Adam Karpierz
|
|
2
|
-
#
|
|
3
|
-
# https://opensource.org/license/zlib
|
|
2
|
+
# SPDX-License-Identifier: Zlib
|
|
4
3
|
|
|
5
4
|
# libusb example program to measure Atmel SAM3U isochronous performance
|
|
6
5
|
# Copyright (C) 2012 Harald Welte <laforge@gnumonks.org>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2016 Adam Karpierz
|
|
2
|
-
#
|
|
3
|
-
# https://opensource.org/license/zlib
|
|
2
|
+
# SPDX-License-Identifier: Zlib
|
|
4
3
|
|
|
5
4
|
# Test suite program based of libusb-0.1-compat testlibusb
|
|
6
5
|
# Copyright (c) 2013 Nathan Hjelm <hjelmn@mac.ccom>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2016 Adam Karpierz
|
|
2
|
-
#
|
|
3
|
-
# https://opensource.org/license/zlib
|
|
2
|
+
# SPDX-License-Identifier: Zlib
|
|
4
3
|
|
|
5
4
|
# xusb: Generic USB test program
|
|
6
5
|
# Copyright © 2009-2012 Pete Batard <pete@akeo.ie>
|
|
@@ -27,7 +26,7 @@ import ctypes as ct
|
|
|
27
26
|
|
|
28
27
|
import libusb as usb
|
|
29
28
|
from libusb._platform import is_windows
|
|
30
|
-
if is_windows: import win32
|
|
29
|
+
if is_windows: import _win32 as win32
|
|
31
30
|
|
|
32
31
|
usb_strerror = lambda r: usb.strerror(r).decode("utf-8")
|
|
33
32
|
usb_error_name = lambda status: usb.error_name(status).decode("utf-8")
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
# Copyright (c) 2016 Adam Karpierz
|
|
2
|
-
#
|
|
3
|
-
# https://opensource.org/license/zlib
|
|
2
|
+
# SPDX-License-Identifier: Zlib
|
|
4
3
|
|
|
5
4
|
[build-system]
|
|
6
5
|
build-backend = 'setuptools.build_meta'
|
|
7
|
-
requires = ['setuptools>=
|
|
6
|
+
requires = ['setuptools>=75.1.0', 'wheel>=0.44.0', 'packaging>=24.1.0', 'tox>=4.20.0']
|
|
8
7
|
|
|
9
8
|
[project]
|
|
10
9
|
name = 'libusb'
|
|
11
|
-
version = '1.0.27'
|
|
10
|
+
version = '1.0.27.post2'
|
|
12
11
|
description = 'Python binding for the libusb C library.'
|
|
13
12
|
urls.Homepage = 'https://pypi.org/project/libusb/'
|
|
14
13
|
urls.Documentation = 'https://libusb.readthedocs.io/'
|
|
@@ -33,38 +32,38 @@ classifiers = [
|
|
|
33
32
|
'Natural Language :: Polish',
|
|
34
33
|
'Programming Language :: Python',
|
|
35
34
|
'Programming Language :: Python :: 3',
|
|
36
|
-
'Programming Language :: Python :: 3.8',
|
|
37
35
|
'Programming Language :: Python :: 3.9',
|
|
38
36
|
'Programming Language :: Python :: 3.10',
|
|
39
37
|
'Programming Language :: Python :: 3.11',
|
|
40
38
|
'Programming Language :: Python :: 3.12',
|
|
39
|
+
'Programming Language :: Python :: 3.13',
|
|
41
40
|
'Programming Language :: Python :: 3 :: Only',
|
|
42
41
|
'Programming Language :: Python :: Implementation :: CPython',
|
|
43
42
|
'Programming Language :: Python :: Implementation :: PyPy',
|
|
44
43
|
'Topic :: Software Development :: Libraries :: Python Modules',
|
|
45
44
|
]
|
|
46
|
-
requires-python = '>=3.
|
|
45
|
+
requires-python = '>=3.9.0,<4.0.0'
|
|
47
46
|
dependencies = [
|
|
48
47
|
# mandatory
|
|
49
|
-
'setuptools>=
|
|
50
|
-
'pkg-about>=1.
|
|
48
|
+
'setuptools>=75.1.0',
|
|
49
|
+
'pkg-about>=1.2.0',
|
|
51
50
|
# others
|
|
52
51
|
]
|
|
53
52
|
dynamic = ['readme']
|
|
54
53
|
[project.optional-dependencies]
|
|
55
54
|
doc = [
|
|
56
|
-
'Sphinx>=7.
|
|
57
|
-
'sphinx-toolbox>=3.
|
|
58
|
-
'sphinx-tabs>=3.4.
|
|
59
|
-
'sphinx-copybutton>=0.5.
|
|
60
|
-
'sphinxcontrib-spelling>=
|
|
61
|
-
'sphinx-lint>=0.
|
|
55
|
+
'Sphinx>=7.4.7',
|
|
56
|
+
'sphinx-toolbox>=3.8.0',
|
|
57
|
+
'sphinx-tabs>=3.4.5',
|
|
58
|
+
'sphinx-copybutton>=0.5.2',
|
|
59
|
+
'sphinxcontrib-spelling>=8.0.0',
|
|
60
|
+
'sphinx-lint>=1.0.0',
|
|
62
61
|
'restructuredtext-lint>=1.4.0',
|
|
63
|
-
'nbsphinx>=0.
|
|
62
|
+
'nbsphinx>=0.9.5',
|
|
64
63
|
]
|
|
65
64
|
test = [
|
|
66
|
-
'deepdiff>=
|
|
67
|
-
'rich>=13.
|
|
65
|
+
'deepdiff>=8.0.1',
|
|
66
|
+
'rich>=13.8.1',
|
|
68
67
|
]
|
|
69
68
|
|
|
70
69
|
[project.scripts]
|
|
@@ -174,29 +173,29 @@ count = true
|
|
|
174
173
|
[tool.tox]
|
|
175
174
|
legacy_tox_ini = """
|
|
176
175
|
[tox]
|
|
177
|
-
envlist = py{
|
|
176
|
+
envlist = py{39,310,311,312,313}, pypy{39,310}, docs
|
|
178
177
|
labels =
|
|
179
|
-
py = py{
|
|
178
|
+
py = py{39,310,311,312,313}, pypy{39,310}
|
|
180
179
|
prepare = prepare
|
|
181
180
|
coverage = coverage
|
|
182
181
|
lint = lint
|
|
183
182
|
docs = docs
|
|
184
|
-
build = py{
|
|
185
|
-
deploy = py{
|
|
186
|
-
minversion = 4.
|
|
183
|
+
build = py{39,310,311,312,313}, pypy{39,310}, docs, build
|
|
184
|
+
deploy = py{39,310,311,312,313}, pypy{39,310}, docs, build, publish
|
|
185
|
+
minversion = 4.20.0
|
|
187
186
|
skip_missing_interpreters = true
|
|
188
187
|
requires =
|
|
189
188
|
{[base]deps}
|
|
190
|
-
virtualenv>=20.
|
|
191
|
-
tox-backtick>=0.
|
|
189
|
+
virtualenv>=20.26.6
|
|
190
|
+
tox-backtick>=0.5.0
|
|
192
191
|
tox-tags>=0.2.0
|
|
193
192
|
|
|
194
193
|
[base]
|
|
195
|
-
basepython = python3.
|
|
194
|
+
basepython = python3.12
|
|
196
195
|
deps =
|
|
197
|
-
pip>=
|
|
198
|
-
setuptools>=
|
|
199
|
-
wheel>=0.
|
|
196
|
+
pip>=24.2.0
|
|
197
|
+
setuptools>=75.1.0
|
|
198
|
+
wheel>=0.44.0
|
|
200
199
|
packagesubdir = libusb
|
|
201
200
|
|
|
202
201
|
[testenv]
|
|
@@ -228,9 +227,9 @@ commands =
|
|
|
228
227
|
{envpython} -m coverage html
|
|
229
228
|
deps =
|
|
230
229
|
{[testenv]deps}
|
|
231
|
-
coverage>=7.
|
|
230
|
+
coverage>=7.6.1
|
|
232
231
|
covdefaults>=2.3.0
|
|
233
|
-
diff-cover>=
|
|
232
|
+
diff-cover>=9.2.0
|
|
234
233
|
|
|
235
234
|
[testenv:docs]
|
|
236
235
|
basepython = {[base]basepython}
|
|
@@ -244,7 +243,7 @@ extras = doc
|
|
|
244
243
|
deps =
|
|
245
244
|
|
|
246
245
|
[testenv:build]
|
|
247
|
-
depends = py{
|
|
246
|
+
depends = py{39,310,311,312,313}, pypy{39,310}, docs
|
|
248
247
|
basepython = {[base]basepython}
|
|
249
248
|
setenv =
|
|
250
249
|
{[testenv]setenv}
|
|
@@ -258,7 +257,7 @@ commands =
|
|
|
258
257
|
{envpython} -m twine check dist/*
|
|
259
258
|
deps =
|
|
260
259
|
{[testenv]deps}
|
|
261
|
-
twine>=
|
|
260
|
+
twine>=5.1.1
|
|
262
261
|
|
|
263
262
|
[testenv:publish]
|
|
264
263
|
depends = build
|
|
@@ -269,7 +268,7 @@ commands =
|
|
|
269
268
|
{envpython} -m twine upload dist/*
|
|
270
269
|
extras =
|
|
271
270
|
deps =
|
|
272
|
-
twine>=
|
|
271
|
+
twine>=5.1.1
|
|
273
272
|
|
|
274
273
|
[testenv:lint]
|
|
275
274
|
basepython = {[base]basepython}
|
|
@@ -278,10 +277,10 @@ commands =
|
|
|
278
277
|
extras =
|
|
279
278
|
deps =
|
|
280
279
|
{[testenv]deps}
|
|
281
|
-
flake8>=7.
|
|
280
|
+
flake8>=7.1.1
|
|
282
281
|
flake8-pyproject>=1.2.3
|
|
283
282
|
flake8-docstrings>=1.7.0
|
|
284
|
-
pep8-naming>=0.
|
|
285
|
-
flake8-builtins>=2.
|
|
283
|
+
pep8-naming>=0.14.1
|
|
284
|
+
flake8-builtins>=2.5.0
|
|
286
285
|
flake8-deprecated>=2.2.1
|
|
287
286
|
"""
|