Skip to content

Cannot install django-linkcheck on CI #200

@david-venhoff

Description

@david-venhoff

When trying to install django-linkcheck on CI, the following error shows up:

  × Building wheel for django-linkcheck (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [22 lines of output]
      Compile translation files
      Traceback (most recent call last):
        File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-install-rhq58wze/django-linkcheck_f1a0ea04f8c448d6b9cd55a44b9e3709/linkcheck/build_meta.py", line 18, in build_wheel
          compile_translation_files()
        File "/tmp/pip-install-rhq58wze/django-linkcheck_f1a0ea04f8c448d6b9cd55a44b9e3709/linkcheck/build_meta.py", line 9, in compile_translation_files
          subprocess.run(["django-admin", "compilemessages"], cwd="linkcheck")
        File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/subprocess.py", line 548, in run
          with Popen(*popenargs, **kwargs) as process:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/subprocess.py", line 1026, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/opt/hostedtoolcache/Python/3.11.7/x64/lib/python3.11/subprocess.py", line 1950, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: 'django-admin'

So it seems like django-admin does not get installed correctly or in time.
Installation usually works locally, because people often have django already installed previously (Which sets up the django-admin command).
This issue only happens in version 2.3 of django-linkcheck and is probably related to this commit: 6a60a24

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