wip
This commit is contained in:
parent
4b59c4f32e
commit
54550d1358
|
@ -11,7 +11,7 @@ import stat
|
|||
import sys
|
||||
import time
|
||||
from glob import glob
|
||||
from typing import List, Literal, Dict, Tuple, TypedDict, TextIO, Optional
|
||||
from typing import List, Literal, Dict, Tuple, TypedDict, TextIO, Optional, Pattern
|
||||
|
||||
IN_NIX_STORE = False
|
||||
CACHE_VERSION = 3
|
||||
|
@ -172,6 +172,8 @@ class CacheDirContent:
|
|||
# requiring to build/fetch the nvidia driver at runtime*.
|
||||
# TODO: compile the regexes
|
||||
NVIDIA_DSO_PATTERNS = [
|
||||
re.compile(pattern)
|
||||
for pattern in [
|
||||
"libEGL_nvidia\.so.*$",
|
||||
"libGLESv1_CM_nvidia\.so.*$",
|
||||
"libGLESv2_nvidia\.so.*$",
|
||||
|
@ -221,16 +223,22 @@ NVIDIA_DSO_PATTERNS = [
|
|||
"libwayland-server\.so.*$",
|
||||
"libwayland-client\.so.*$",
|
||||
]
|
||||
]
|
||||
|
||||
CUDA_DSO_PATTERNS = ["libcudadebugger\.so.*$", "libcuda\.so.*$"]
|
||||
CUDA_DSO_PATTERNS = [
|
||||
re.compile(pattern) for pattern in ["libcudadebugger\.so.*$", "libcuda\.so.*$"]
|
||||
]
|
||||
|
||||
GLX_DSO_PATTERNS = ["libGLX_nvidia\.so.*$"]
|
||||
GLX_DSO_PATTERNS = [re.compile(pattern) for pattern in ["libGLX_nvidia\.so.*$"]]
|
||||
|
||||
EGL_DSO_PATTERNS = [
|
||||
re.compile(pattern)
|
||||
for pattern in [
|
||||
"libEGL_nvidia\.so.*$",
|
||||
"libnvidia-egl-wayland\.so.*$",
|
||||
"libnvidia-egl-gbm\.so.*$",
|
||||
]
|
||||
]
|
||||
|
||||
|
||||
def get_ld_paths() -> List[str]:
|
||||
|
@ -283,7 +291,9 @@ def get_ld_paths() -> List[str]:
|
|||
return [path for path in paths if os.path.isdir(path)]
|
||||
|
||||
|
||||
def resolve_libraries(path: str, files_patterns: List[str]) -> List[ResolvedLib]:
|
||||
def resolve_libraries(
|
||||
path: str, files_patterns: List[Pattern[str]]
|
||||
) -> List[ResolvedLib]:
|
||||
"""Scans the PATH directory looking for the files complying with
|
||||
the FILES_PATTERNS regexes list.
|
||||
|
||||
|
|
Loading…
Reference in New Issue