Skip to content

check-yaml pre-commit hooks failing after ruamel.yaml 0.19.0 update #1233

@metaloid2k21

Description

@metaloid2k21

Seems like check-yaml pre-commit hook now requires gcc + python3.11-devel packages (debian) to be installed, after ruamel.yaml dependency 0.19.0 update.
Getting the following error:

[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/repojv29_o8m/py_env-python3/bin/python', '-mpip', 'install', '.')
return code: 1
stdout:
    Processing /root/.cache/pre-commit/repojv29_o8m
      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==4.6.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==4.6.0)
      Downloading ruamel_yaml_clibz-0.3.5.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-4.6.0-py2.py3-none-any.whl size=41231 sha256=4106dca7dee80f65e6c4f72ef1455508369f96a867e2ab9befa71db3b6e427bb
      Stored in directory: /tmp/pip-ephem-wheel-cache-3aw3mi17/wheels/1f/58/02/2714cbda0820c23c585af0dd20ddee6950c50aa4afa2947115
      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-ga4pt8f_/overlay/lib/python3.11/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-311
          gcc -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -ftree-vectorize -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -ftree-vectorize -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -ftree-vectorize -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -m64 -march=x86-64-v2 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/root/.cache/pre-commit/repojv29_o8m/py_env-python3/include -I/usr/include/python3.11 -c _ruamel_yaml_clibz.c -o build/temp.linux-x86_64-cpython-311/_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: failed-wheel-build-for-install
    
    × Failed to build installable wheels for some pyproject.toml based projects
    ╰─> ruamel.yaml.clibz
Check the log at /root/.cache/pre-commit/pre-commit.log

Would you have any alternative workaround? Setting the additional_dependencies property seems not to be working.

Thanks in advance.

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