Something went wrong. Try again.
lol
Something went wrong. Try again.
1.4 kB · 48 lines
at master
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849diff --git a/setup.cfg b/setup.cfgindex b04257d..f5c436a 100644--- a/setup.cfg+++ b/setup.cfg@@ -45,7 +45,6 @@ package_dir = =src zip_safe = False install_requires =- importlib_resources [options.packages.find] where = srcdiff --git a/src/libusb_package/__init__.py b/src/libusb_package/__init__.pyindex 67e3e46..684be57 100644--- a/src/libusb_package/__init__.py+++ b/src/libusb_package/__init__.py@@ -21,10 +21,9 @@ import ctypes.util import functools import platform import sys+from pathlib import Path from typing import (Any, Optional, TYPE_CHECKING) -import importlib_resources- from ._version import version as __version__ if TYPE_CHECKING:@@ -49,18 +48,7 @@ def get_library_path() -> Optional[Path]: The path is valid until the process exits. If the library was extracted from a zip in order to be accessible as a file, it will be cleaned up with the process exits. """- lib_resource = importlib_resources.files(__name__).joinpath(_LIBRARY_NAME)- if lib_resource.is_file():- path_context = importlib_resources.as_file(lib_resource)- path = path_context.__enter__()-- @atexit.register- def cleanup():- path_context.__exit__(None, None, None)-- return path- else:- return None+ return Path('@libusb1@') def find_library(candidate: str) -> Optional[str]: