uv: Failure to build cydifflib (Compatibility with CMake < 3.5 error)

Summary

I’m trying to track down a build issue that has appeared on recent GitHub Actions builds of a library of mine, due to errors in building the dependency cydifflib.

Perhaps someone can help me narrow down if it’s a uv issue or something else like a cmake or scikit-build issue in certain environments.

The exact same build used to work with uv and Python 3.13 and GitHub’s ubuntu runner but then stopped working, without any change to deps or code, so it seems linked to certain environments. I even narrowed it down that the exact same build had passed but then failed when rerun 2 weeks later (first and second runs of this build, which presumably would only be due to a newer GitHub Actions runner image or maybe uv cache interactions).

I’ve also gotten reports of this issue on macOS but can’t reproduce that myself. It affects Python 3.13 but not Python 3.11 and 3.12 on my tests.

The error is on latest uv and latest GitHub ubuntu runner: Compatibility with CMake < 3.5 has been removed from CMake.

But I’ve confirmed the build environment actually has cmake version 3.31.6. And cydifflib’s declarations ask for cmake 3.12.

A full repro and logs of this on GitHub Actions with a minimal project (only cydifflib as a dep) is here

Thanks so much for any pointers!

Edit: Note the fix of setting CMAKE_ARGS to “-DCMAKE_POLICY_VERSION_MINIMUM=3.5” does work as a workaround on GitHub Actions. But this is still an issue because I want users to be able to uv tool install my libs without issues.

Downloaded nodejs-wheel-binaries
  × Failed to build `cydifflib==1.1.0`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)
...
      CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
        Compatibility with CMake < 3.5 has been removed from CMake.

        Update the VERSION argument <min> value.  Or, use the <min>...<max>
      syntax
        to tell CMake that the project requires at least <min> but has been
      updated
        to work with policies introduced by <max> or earlier.

        Or, add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to try configuring anyway.

      ********************************************************************************
                      scikit-build could not get a working generator for your
      system. Aborting build.

                      Building Linux wheels for Python 3.13 requires a
      compiler (e.g gcc).
      But scikit-build does *NOT* know how to install it on ubuntu

      To build compliant wheels, consider using the manylinux system described
      in PEP-[51](https://github.com/jlevy/test-cydifflib/actions/runs/14299332468/job/40071007310#step:6:52)3.
      Get it with "dockcross/manylinux-x64" docker image:

        https://github.com/dockcross/dockcross#readme

      For more details, please refer to scikit-build documentation:

        http://scikit-build.readthedocs.io/en/latest/generators.html#linux

Platform

ubuntu-latest 3.13 (GitHub Actions current runner 2.323.0)

Version

v0.6.12

Python version

Python 3.13.2

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 16 (6 by maintainers)

Most upvoted comments

GitHub updated runner images - see https://github.com/actions/runner-images/issues/11926

That’s likely the cause of your issues.

Yeah I think (4) requires upstream standardization, or uv cannot reliably detect conflicts.

(3) makes sense. We are interested in the idea of improving vendoring workflows like that, but it’s a bit lower priority than some other pain points.

(2) could work, but it’s a little questionable as it invalidates some base assumptions in our cache. I think in the long term, we want to special case tool installs when the package uses uv, such as adding a --locked option.

Unfortunately we can’t pin or check system packages yet. https://peps.python.org/pep-0725/ pokes at this idea.