Skip to content

New version on ruamel.yaml breaks the build system #1229

@ngyl88

Description

@ngyl88

We have been using pre-commit-hooks v6.0.0 for several months without failure, until today ruamel.yaml 0.19.0 release. We are using an alpine build image.

Stack trace:

[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/root/.cache/pre-commit/repojimb_33o/py_env-python3/bin/python', '-mpip', 'install', '.')
return code: 1
stdout:
    Processing /root/.cache/pre-commit/repojimb_33o
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'done'
    Collecting ruamel.yaml>=0.15 (from pre_commit_hooks==6.0.0)
      Downloading ruamel_yaml-0.19.0-py3-none-any.whl.metadata (15 kB)
    Collecting ruamel.yaml.clibz>=0.3.3 (from ruamel.yaml>=0.15->pre_commit_hooks==6.0.0)
      Downloading ruamel_yaml_clibz-0.3.4.tar.gz (231 kB)
      Installing build dependencies: started
      Installing build dependencies: finished with status 'done'
      Getting requirements to build wheel: started
      Getting requirements to build wheel: finished with status 'done'
      Preparing metadata (pyproject.toml): started
      Preparing metadata (pyproject.toml): finished with status 'done'
    Downloading ruamel_yaml-0.19.0-py3-none-any.whl (117 kB)
    Building wheels for collected packages: pre_commit_hooks, ruamel.yaml.clibz
      Building wheel for pre_commit_hooks (pyproject.toml): started
      Building wheel for pre_commit_hooks (pyproject.toml): finished with status 'done'
      Created wheel for pre_commit_hooks: filename=pre_commit_hooks-6.0.0-py2.py3-none-any.whl size=39204 sha256=666bd9825db68817d021b70e2c6ec05e251aad79b21ceffba82e80a32fc47ce9
      Stored in directory: /tmp/pip-ephem-wheel-cache-zmmfnz67/wheels/15/0a/ca/4f6defde516edfc2d4b89e8b6babc0aa2349b7cb067c6770ff
      Building wheel for ruamel.yaml.clibz (pyproject.toml): started
      Building wheel for ruamel.yaml.clibz (pyproject.toml): finished with status 'error'
    Successfully built pre_commit_hooks
    Failed to build ruamel.yaml.clibz
stderr:
      error: subprocess-exited-with-error
      
      × Building wheel for ruamel.yaml.clibz (pyproject.toml) did not run successfully.
      │ exit code: 1
      ╰─> [9 lines of output]
          /tmp/pip-build-env-dwb58bd0/overlay/lib/python3.12/site-packages/setuptools/_distutils/dist.py:289: UserWarning: Unknown distribution option: 'build_zig'
            warnings.warn(msg)
          running bdist_wheel
          running build
          running build_ext
          building '_ruamel_yaml_clibz' extension
          creating build/temp.linux-x86_64-cpython-312
          gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -fPIC -I/root/.cache/pre-commit/repojimb_33o/py_env-python3/include -I/usr/include/python3.12 -c _ruamel_yaml_clibz.c -o build/temp.linux-x86_64-cpython-312/_ruamel_yaml_clibz.o
          error: command 'gcc' failed: No such file or directory
          [end of output]
      
      note: This error originates from a subprocess, and is likely not a problem with pip.
      ERROR: Failed building wheel for ruamel.yaml.clibz
    ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (ruamel.yaml.clibz)

Extracted from https://pypi.org/project/ruamel.yaml/ ,

Starting with 0.19.0 ruamel.yaml no longer has ruamel.yaml.clib as a dependency, as this has been replaced with ruamel.yaml.clibz. The C sources are functionally unchanged, but they are now always compiled (using setuptools-zig and ziglang) on your system, instead of being downloaded as pre-compiled wheels (if available). For this to function properly your Python (virtual) environment needs to have an up-to-date version of setuptools and wheels pre-installed.

Cause identification:

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