scikit-build-core icon indicating copy to clipboard operation
scikit-build-core copied to clipboard

`cmake.prefix` entry-point can fail when it is pointing to a `MultiplexedPath`

Open LecrisUT opened this issue 1 year ago • 2 comments

I am experimenting with building a compiled non-python project within scikit-build-core, and I've encountered an issue if you point the entry-point to a non-pythonic object, i.e.:

[build-system]
requires = ["scikit-build-core"]
build-backend = "scikit_build_core.build"

[project]
name = "CMake-Template"

[project.entry-points."cmake.prefix"]
CMakeTemplatePrefix = "cmake_template"

[tool.scikit-build]
wheel.install-dir = "cmake_template"

The verbose log shows:

    set(CMAKE_PREFIX_PATH [===[MultiplexedPath('/home/lecris/CLionProjects/Template/venv/lib64/python3.12/site-packages/cmake_template');/home/lecris/CLionProjects/Template/venv/lib/python3.12/site-packages]===] CACHE PATH "" FORCE)

Probably should address in #880. But I need to debug more why did it even create MultiplexedPath in this case when I've installed it without editable or such.


Edit: So this is fun. It's a MultiplexedPath with a single item :shrug:

LecrisUT avatar Sep 02 '24 15:09 LecrisUT

We should be able to handle multiplexed paths, that could be a fix before 0.11.

henryiii avatar Sep 03 '24 14:09 henryiii

That could be a bit tricky to detangle from 836c51ecfa5f898e3bb25407eb45954332a24ba0.

Could be easier if we keep the _handle_search_paths and _sanitize_path parts, but remove the settings_val part from it. Wdyt?

LecrisUT avatar Sep 03 '24 14:09 LecrisUT