Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

- feat: add buffer protocol support to utils by @aisk in #175
- fix: keep tests and lint passing with newer scikit-build-core and ruff by @aisk

## [0.0.45]

Expand Down
7 changes: 6 additions & 1 deletion ggml/ggml.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,13 @@ def load_shared_library(module_name: str, lib_base_name: str):
path: Optional[pathlib.Path] = None

for lib_name in lib_names:
# Prefer a plain filesystem lookup, which works regardless of how the
# package loader exposes resources (e.g. editable installs).
if (base_path / lib_name).exists():
path = base_path / lib_name
break
try:
with importlib_resources.as_file(importlib_resources.files(module_name).joinpath("lib", lib_name)) as p: # type: ignore
with importlib_resources.as_file(importlib_resources.files(module_name).joinpath("lib").joinpath(lib_name)) as p: # type: ignore
p = cast(pathlib.Path, p)
if os.path.exists(p):
path = p
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ testpaths = "tests"
target-version = "py38"
extend-exclude = ["ggml/contrib/onnx.py", "tests/test_ggml_onnx.py"]

[tool.ruff.lint]
select = ["E4", "E7", "E9", "F"]

[tool.ruff.lint.per-file-ignores]
"ggml/__init__.py" = ["F403"]

Expand Down