Skip to content

Commit

Permalink
fix: don't warn if lib not found on UNIX, just debug (#730)
Browse files Browse the repository at this point in the history
It's not used on UNIX.

Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Apr 29, 2024
1 parent 60d5152 commit 8634397
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/scikit_build_core/builder/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ def get_python_library(env: Mapping[str, str], *, abi3: bool = False) -> Path |
multiarch: str | None = sysconfig.get_config_var("MULTIARCH")
masd: str | None = sysconfig.get_config_var("multiarchsubdir")

log_func = logger.warning if sys.platform.startswith("win") else logger.debug

if libdir and ldlibrary:
try:
libdir_is_dir = libdir.is_dir()
Expand All @@ -75,9 +77,9 @@ def get_python_library(env: Mapping[str, str], *, abi3: bool = False) -> Path |
libpath = libdir / ldlibrary
if Path(os.path.expandvars(libpath)).is_file():
return libpath
logger.warning("libdir/ldlibrary: {} is not a real file!", libpath)
log_func("libdir/ldlibrary: {} is not a real file!", libpath)
else:
logger.warning("libdir: {} is not a directory", libdir)
log_func("libdir: {} is not a directory", libdir)

framework_prefix = sysconfig.get_config_var("PYTHONFRAMEWORKPREFIX")
if framework_prefix and Path(framework_prefix).is_dir() and ldlibrary:
Expand Down

0 comments on commit 8634397

Please sign in to comment.