First steps with cibuildwheel

I’m struggling with cibuildwheel and I could not find any useful information in Github Actions logs.
Can anybody help me?

You can see two different build logs:

All I have is an exit code number but no clue about what may be wrong or missing.

The log is formatted in a way that you have to press on the > Building wheel... line in order to open the collapsed formatting and see the complete log. You can also click on the gear in the upper right corner, and choose the “View raw logs” menu item. When I do that, I can see the line AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'

1 Like

I see now. In the formatted logs, I focused my attention on the red line, but the error was in the previous folded block and I had to collapse it to see it. The raw log lists everything as in a text editor so it’s easier.

Now I’m surprised that the docker ubuntu image doesn’t have apt or apt-get installed:

sh: apt: command not found
sh: apt-get: command not found

Ok, manylinux2010 is based on CentOS, so I should use yum!

I made a lot of changes, but I still see this error. I searched a lot but I couldn’t find any solution to this problem. The metadata are set in pyproject.toml and follow PEP 621. Isn’t this enough?
Here’s my latest build error:

Traceback (most recent call last):
        File "/opt/python/cp39-cp39/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 143, in prepare_metadata_for_build_wheel
          hook = backend.prepare_metadata_for_build_wheel
      AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
  
      During handling of the above exception, another exception occurred:
  
      Traceback (most recent call last):
        File "/tmp/pip-build-env-1l38rgex/overlay/lib/python3.9/site-packages/sipbuild/pyproject.py", line 158, in get_section
          section = section[part]
      KeyError: 'metadata'

Forget my last comment: I realized I should have not removed the tool.sip.metadata section from pyproject.toml.

The real problem is some C++ build error, maybe due to the manylinux image being too old. But it’s actually the latest one I can use unfortunately.

My last build log: