Skip to content

Setup error running pre-commit #3481

@dkaszews

Description

@dkaszews
$ pre-commit run --all-files --show-diff-on-failure
[INFO] Installing environment for https://github.com/PyCQA/docformatter.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: command: ('/home/dkaszews/.cache/pre-commit/rep
op11suyu6/py_env-python3/bin/python', '-mpip', 'install', '.', 'tomli')
return code: 1
stdout:
    Processing ./.
      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 tomli
      Using cached tomli-2.4.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_
x86_64.whl.metadata (10 kB)
    Collecting charset_normalizer<4.0.0,>=3.0.0 (from docformatter==1.7.7)
      Using cached charset_normalizer-3.4.7-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.ma
nylinux_2_28_x86_64.whl.metadata (40 kB)
    Collecting untokenize<0.2.0,>=0.1.1 (from docformatter==1.7.7)
      Using cached untokenize-0.1.1.tar.gz (3.1 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 'error'
stderr:
      error: subprocess-exited-with-error
      
      × Getting requirements to build wheel did not run successfully.
      │ exit code: 1
      ╰─> [24 lines of output]
          Traceback (most recent call last):
            File "/home/dkaszews/.cache/pre-commit/repop11suyu6/py_env-python3/lib/python3.14/site-pa
ckages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
              main()
              ~~~~^^
            File "/home/dkaszews/.cache/pre-commit/repop11suyu6/py_env-python3/lib/python3.14/site-pa
ckages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main
              json_out["return_val"] = hook(**hook_input["kwargs"])
                                       ~~~~^^^^^^^^^^^^^^^^^^^^^^^^
            File "/home/dkaszews/.cache/pre-commit/repop11suyu6/py_env-python3/lib/python3.14/site-pa
ckages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_w
heel
              return hook(config_settings)
            File "/tmp/pip-build-env-bimy38yi/overlay/lib/python3.14/site-packages/setuptools/build_m
eta.py", line 333, in get_requires_for_build_wheel
              return self._get_build_requires(config_settings, requirements=[])
                     ~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/tmp/pip-build-env-bimy38yi/overlay/lib/python3.14/site-packages/setuptools/build_m
eta.py", line 301, in _get_build_requires
              self.run_setup()
              ~~~~~~~~~~~~~~^^
            File "/tmp/pip-build-env-bimy38yi/overlay/lib/python3.14/site-packages/setuptools/build_m
eta.py", line 520, in run_setup
              super().run_setup(setup_script=setup_script)
              ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
            File "/tmp/pip-build-env-bimy38yi/overlay/lib/python3.14/site-packages/setuptools/build_m
eta.py", line 317, in run_setup
              exec(code, locals())
              ~~~~^^^^^^^^^^^^^^^^
            File "<string>", line 19, in <module>
            File "<string>", line 14, in version
          AttributeError: 'Constant' object has no attribute 's'
          [end of output]
      
      note: This error originates from a subprocess, and is likely not a problem with pip.
    ERROR: Failed to build 'untokenize' when getting requirements to build wheel

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