autogen: fix imports in libusb (#11294)

This commit is contained in:
nimlgen
2025-07-21 13:04:27 +03:00
committed by GitHub
parent dd6a2d432f
commit df3ba0a7c0
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -444,7 +444,7 @@ generate_libusb() {
-o $BASE/libusb.py
fixup $BASE/libusb.py
sed -i "s\import ctypes\import ctypes, os\g" $BASE/libusb.py
sed -i "s\import ctypes\import ctypes, ctypes.util, os\g" $BASE/libusb.py
sed -i "s/FIXME_STUB/libusb/g" "$BASE/libusb.py"
sed -i "s/libusb_le16_to_cpu = libusb_cpu_to_le16//g" "$BASE/libusb.py"
sed -i "s/FunctionFactoryStub()/None if (lib_path:=os.getenv('LIBUSB_PATH', ctypes.util.find_library('usb-1.0'))) is None else ctypes.CDLL(lib_path)/g" "$BASE/libusb.py"
+1 -1
View File
@@ -6,7 +6,7 @@
# POINTER_SIZE is: 8
# LONGDOUBLE_SIZE is: 16
#
import ctypes, os
import ctypes, ctypes.util, os
class FunctionFactoryStub: