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.
Files changed (64) hide show
  1. {libusb-1.0.27 → libusb-1.0.27.post2}/.readthedocs.yml +1 -1
  2. {libusb-1.0.27 → libusb-1.0.27.post2}/CHANGES.rst +12 -0
  3. {libusb-1.0.27 → libusb-1.0.27.post2}/MANIFEST.in +1 -2
  4. {libusb-1.0.27 → libusb-1.0.27.post2}/PKG-INFO +30 -17
  5. {libusb-1.0.27 → libusb-1.0.27.post2}/README.rst +4 -3
  6. {libusb-1.0.27 → libusb-1.0.27.post2}/docs/conf.py +1 -1
  7. libusb-1.0.27.post2/examples/_win32.py +149 -0
  8. {libusb-1.0.27 → libusb-1.0.27.post2}/examples/dpfp.py +2 -3
  9. {libusb-1.0.27 → libusb-1.0.27.post2}/examples/dpfp_threaded.py +1 -2
  10. {libusb-1.0.27 → libusb-1.0.27.post2}/examples/ezusb.py +1 -2
  11. {libusb-1.0.27 → libusb-1.0.27.post2}/examples/fxload.py +1 -2
  12. {libusb-1.0.27 → libusb-1.0.27.post2}/examples/hotplugtest.py +1 -2
  13. {libusb-1.0.27 → libusb-1.0.27.post2}/examples/listdevs.py +1 -2
  14. {libusb-1.0.27 → libusb-1.0.27.post2}/examples/sam3u_benchmark.py +1 -2
  15. {libusb-1.0.27 → libusb-1.0.27.post2}/examples/testlibusb.py +1 -2
  16. {libusb-1.0.27 → libusb-1.0.27.post2}/examples/xusb.py +2 -3
  17. {libusb-1.0.27 → libusb-1.0.27.post2}/pyproject.toml +35 -36
  18. libusb-1.0.27.post2/src/libusb/__about__.py +4 -0
  19. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/__init__.py +1 -2
  20. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_config.py +1 -2
  21. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_dll.py +1 -2
  22. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_libusb.py +581 -591
  23. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/__init__.py +1 -2
  24. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_linux/__init__.py +2 -3
  25. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_macos/__init__.py +1 -2
  26. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_windows/__init__.py +1 -2
  27. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb.egg-info/PKG-INFO +30 -17
  28. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb.egg-info/SOURCES.txt +2 -2
  29. libusb-1.0.27.post2/src/libusb.egg-info/requires.txt +16 -0
  30. {libusb-1.0.27 → libusb-1.0.27.post2}/tests/__init__.py +1 -2
  31. {libusb-1.0.27 → libusb-1.0.27.post2}/tests/__main__.py +1 -2
  32. libusb-1.0.27.post2/tests/_win32.py +149 -0
  33. {libusb-1.0.27 → libusb-1.0.27.post2}/tests/test_main.py +1 -2
  34. {libusb-1.0.27 → libusb-1.0.27.post2}/tests/testlib.py +1 -2
  35. {libusb-1.0.27 → libusb-1.0.27.post2}/tests/tman_init_context.py +1 -2
  36. {libusb-1.0.27 → libusb-1.0.27.post2}/tests/tman_set_option.py +1 -2
  37. {libusb-1.0.27 → libusb-1.0.27.post2}/tests/tman_stress.py +1 -2
  38. {libusb-1.0.27 → libusb-1.0.27.post2}/tests/tman_stress_mt.py +2 -3
  39. {libusb-1.0.27 → libusb-1.0.27.post2}/tests/umockdev.py_ +1 -2
  40. libusb-1.0.27/examples/win32.py +0 -81
  41. libusb-1.0.27/src/libusb/__about__.py +0 -6
  42. libusb-1.0.27/src/libusb.egg-info/requires.txt +0 -16
  43. libusb-1.0.27/tests/win32.py +0 -81
  44. {libusb-1.0.27 → libusb-1.0.27.post2}/LICENSE +0 -0
  45. {libusb-1.0.27 → libusb-1.0.27.post2}/docs/CHANGES.rst +0 -0
  46. {libusb-1.0.27 → libusb-1.0.27.post2}/docs/README.rst +0 -0
  47. {libusb-1.0.27 → libusb-1.0.27.post2}/docs/_static/libusb.png +0 -0
  48. {libusb-1.0.27 → libusb-1.0.27.post2}/docs/_templates/.keep +0 -0
  49. {libusb-1.0.27 → libusb-1.0.27.post2}/docs/index.rst +0 -0
  50. {libusb-1.0.27 → libusb-1.0.27.post2}/setup.cfg +0 -0
  51. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/__config__.py +0 -0
  52. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_linux/aarch64/libusb-1.0.so +0 -0
  53. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_linux/x64/libusb-1.0.so +0 -0
  54. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_linux/x86/libusb-1.0.so +0 -0
  55. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_macos/x64/10.7/libusb-1.0.0.dylib +0 -0
  56. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_macos/x64/11.6/libusb-1.0.0.dylib +0 -0
  57. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_macos/x86/.keep +0 -0
  58. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_windows/x64/libusb-1.0.dll +0 -0
  59. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/_platform/_windows/x86/libusb-1.0.dll +0 -0
  60. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb/libusb.cfg +0 -0
  61. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb.egg-info/dependency_links.txt +0 -0
  62. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb.egg-info/not-zip-safe +0 -0
  63. {libusb-1.0.27 → libusb-1.0.27.post2}/src/libusb.egg-info/top_level.txt +0 -0
  64. {libusb-1.0.27 → libusb-1.0.27.post2}/tests/data/.keep +0 -0
@@ -2,7 +2,7 @@ version: 2
2
2
  build:
3
3
  os: "ubuntu-22.04"
4
4
  tools:
5
- python: "3.11"
5
+ python: "3.12"
6
6
  python:
7
7
  install:
8
8
  - method: pip
@@ -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,5 @@
1
1
  # Copyright (c) 2016 Adam Karpierz
2
- # Licensed under the zlib/libpng License
3
- # https://opensource.org/license/zlib
2
+ # SPDX-License-Identifier: Zlib
4
3
 
5
4
  include README.rst
6
5
  include CHANGES.rst
@@ -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.8.1
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>=68.2.2
37
- Requires-Dist: pkg-about>=1.1.5
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.1.2; extra == "doc"
40
- Requires-Dist: sphinx-toolbox>=3.5.0; extra == "doc"
41
- Requires-Dist: sphinx-tabs>=3.4.1; extra == "doc"
42
- Requires-Dist: sphinx-copybutton>=0.5.1; extra == "doc"
43
- Requires-Dist: sphinxcontrib-spelling>=7.7.0; extra == "doc"
44
- Requires-Dist: sphinx-lint>=0.6.7; extra == "doc"
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.8.10; extra == "doc"
46
+ Requires-Dist: nbsphinx>=0.9.5; extra == "doc"
47
47
  Provides-Extra: test
48
- Requires-Dist: deepdiff>=6.7.1; extra == "test"
49
- Requires-Dist: rich>=13.7.0; extra == "test"
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.8 or higher
128
+ + Python 3.9 or higher
129
129
 
130
130
  * https://www.python.org/
131
- * with C libusb 1.0.26 is a primary test environment.
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
- | Copyright (c) 2016-2024 Adam Karpierz
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.8 or higher
78
+ + Python 3.9 or higher
79
79
 
80
80
  * https://www.python.org/
81
- * with C libusb 1.0.26 is a primary test environment.
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
- | Copyright (c) 2016-2024 Adam Karpierz
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 = '3.4.3'
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
- # Licensed under the zlib/libpng License
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
- # Licensed under the zlib/libpng License
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
- # Licensed under the zlib/libpng License
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
- # Licensed under the zlib/libpng License
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
- # Licensed under the zlib/libpng License
3
- # https://opensource.org/license/zlib
2
+ # SPDX-License-Identifier: Zlib
4
3
 
5
4
  # libusb example program for hotplug API
6
5
  # Copyright © 2012-2013 Nathan Hjelm <hjelmn@mac.com>
@@ -1,6 +1,5 @@
1
1
  # Copyright (c) 2016 Adam Karpierz
2
- # Licensed under the zlib/libpng License
3
- # https://opensource.org/license/zlib
2
+ # SPDX-License-Identifier: Zlib
4
3
 
5
4
  # libusb example program to list devices on the bus
6
5
  # Copyright © 2007 Daniel Drake <dsd@gentoo.org>
@@ -1,6 +1,5 @@
1
1
  # Copyright (c) 2016 Adam Karpierz
2
- # Licensed under the zlib/libpng License
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
- # Licensed under the zlib/libpng License
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
- # Licensed under the zlib/libpng License
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
- # Licensed under the zlib/libpng License
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>=68.2.2', 'wheel>=0.42.0', 'packaging>=23.2.0', 'tox>=4.11.3']
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.8.1,<4.0.0'
45
+ requires-python = '>=3.9.0,<4.0.0'
47
46
  dependencies = [
48
47
  # mandatory
49
- 'setuptools>=68.2.2',
50
- 'pkg-about>=1.1.5',
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.1.2',
57
- 'sphinx-toolbox>=3.5.0',
58
- 'sphinx-tabs>=3.4.1',
59
- 'sphinx-copybutton>=0.5.1',
60
- 'sphinxcontrib-spelling>=7.7.0',
61
- 'sphinx-lint>=0.6.7',
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.8.10',
62
+ 'nbsphinx>=0.9.5',
64
63
  ]
65
64
  test = [
66
- 'deepdiff>=6.7.1',
67
- 'rich>=13.7.0',
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{38,39,310,311,312}, pypy{39,310}, docs
176
+ envlist = py{39,310,311,312,313}, pypy{39,310}, docs
178
177
  labels =
179
- py = py{38,39,310,311,312}, pypy{39,310}
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{38,39,310,311,312}, pypy{39,310}, docs, build
185
- deploy = py{38,39,310,311,312}, pypy{39,310}, docs, build, publish
186
- minversion = 4.11.3
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.25.0
191
- tox-backtick>=0.4.4
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.11
194
+ basepython = python3.12
196
195
  deps =
197
- pip>=23.3.2
198
- setuptools>=68.2.2
199
- wheel>=0.42.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.4.0
230
+ coverage>=7.6.1
232
231
  covdefaults>=2.3.0
233
- diff-cover>=7.7.0
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{38,39,310,311,312}, pypy{39,310}, docs
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>=4.0.2
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>=4.0.2
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.0.0
280
+ flake8>=7.1.1
282
281
  flake8-pyproject>=1.2.3
283
282
  flake8-docstrings>=1.7.0
284
- pep8-naming>=0.13.3
285
- flake8-builtins>=2.2.0
283
+ pep8-naming>=0.14.1
284
+ flake8-builtins>=2.5.0
286
285
  flake8-deprecated>=2.2.1
287
286
  """
@@ -0,0 +1,4 @@
1
+ # Copyright (c) 2016 Adam Karpierz
2
+ # SPDX-License-Identifier: Zlib
3
+
4
+ __import__("pkg_about").about()
@@ -1,6 +1,5 @@
1
1
  # Copyright (c) 2016 Adam Karpierz
2
- # Licensed under the zlib/libpng License
3
- # https://opensource.org/license/zlib
2
+ # SPDX-License-Identifier: Zlib
4
3
 
5
4
  from .__about__ import * ; del __about__ # noqa
6
5
  from . import __config__ ; del __config__
@@ -1,6 +1,5 @@
1
1
  # Copyright (c) 2016 Adam Karpierz
2
- # Licensed under the zlib/libpng License
3
- # https://opensource.org/license/zlib
2
+ # SPDX-License-Identifier: Zlib
4
3
 
5
4
  __all__ = ('make_config',)
6
5
 
@@ -1,6 +1,5 @@
1
1
  # Copyright (c) 2016 Adam Karpierz
2
- # Licensed under the zlib/libpng License
3
- # https://opensource.org/license/zlib
2
+ # SPDX-License-Identifier: Zlib
4
3
 
5
4
  from ._platform import DLL_PATH, DLL, dlclose
6
5