Skip to content

openexr_skbuild_plugin.py adds an unnecessary cmake build requirement #1957

@mgorny

Description

@mgorny

def get_requires_for_dynamic_metadata(
_settings: Optional[Dict[str, object]] = None,
) -> List[str]:
return ["cmake"]

This code is unconditionally adding a dependency on cmake PyPI project. This is inconsistent with how scikit-build-core operates, as it prefers using system CMake and adds the dependency only if it can't find a working version. However, the plugin effectively forces it to use the version from PyPI which is less portable, as it lacks downstream patching.

Given that scikit-build-core requires CMake by its purpose, I don't really understand why the plugin would need to add a dependency in the first place. And if you really to do it, I think it would be better to use the same approach as scikit-build-core does, i.e.:

https://github.com/scikit-build/scikit-build-core/blob/4fbd3b702db5157fa8c742b6c799a60adfb038e5/src/scikit_build_core/build/__init__.py#L154-L164

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions