This is an automated email from the ASF dual-hosted git repository.
junrushao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm-ffi.git
The following commit(s) were added to refs/heads/main by this push:
new 3cfc5c5 fix(config): `tvm-ffi-config --sourcedir` broken in wheels
(#319)
3cfc5c5 is described below
commit 3cfc5c577196c44944fc82863c8eb6a8d4757868
Author: Junru Shao <[email protected]>
AuthorDate: Sun Dec 7 11:29:40 2025 -0800
fix(config): `tvm-ffi-config --sourcedir` broken in wheels (#319)
Bug detected in:
https://github.com/apache/tvm-ffi/actions/runs/20001883512/workflow
In fact, checking `${guess}/cmake` is not a reliable way to locate
source directory of apache-tvm-ffi wheel, because the cmake directory
actually lives under `${guess}/share/cmake` in the wheel.
This PR switches to `${guess}/src`, which always reliably locates in the
same relative path.
---
python/tvm_ffi/libinfo.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/tvm_ffi/libinfo.py b/python/tvm_ffi/libinfo.py
index 35abd2c..32295ce 100644
--- a/python/tvm_ffi/libinfo.py
+++ b/python/tvm_ffi/libinfo.py
@@ -62,7 +62,7 @@ def find_source_path() -> str:
_rel_top_directory(),
_dev_top_directory(),
],
- cond=lambda p: (p / "cmake").is_dir(),
+ cond=lambda p: (p / "src").is_dir(),
):
return ret
raise RuntimeError("Cannot find home path.")