python-lsp/python-lsp-ruff

Fails to install on Termux

edshamis opened this issue · 2 comments

❯ pip install python-lsp-ruff
Collecting python-lsp-ruff
Downloading python_lsp_ruff-1.4.0-py3-none-any.whl (9.2 kB)
Collecting ruff>=0.0.260 (from python-lsp-ruff)
Using cached ruff-0.0.267.tar.gz (1.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [22 lines of output]
error: failed to get ruff as a dependency of package ruff_cli v0.0.267 (/data/data/com.termux/files/usr/tmp/pip-install-4ta5rki6/ruff_55c9c69c060f4940954cdd8d1f2a0b40/crates/ruff_cli)

  Caused by:
    failed to load source for dependency `ruff`

  Caused by:
    Unable to update /data/data/com.termux/files/usr/tmp/pip-install-4ta5rki6/ruff_55c9c69c060f4940954cdd8d1f2a0b40/local_dependencies/ruff

  Caused by:
    failed to parse manifest at `/data/data/com.termux/files/usr/tmp/pip-install-4ta5rki6/ruff_55c9c69c060f4940954cdd8d1f2a0b40/local_dependencies/ruff/Cargo.toml`

  Caused by:
    error inheriting `colored` from workspace root manifest's `workspace.dependencies.colored`

  Caused by:
    failed to find a workspace root
  💥 maturin failed
    Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
    Caused by: `cargo metadata` exited with an error:
  Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/data/data/com.termux/files/usr/tmp/pip-modern-metadata-osjlu_8g', '--interpreter', '/data/data/com.termux/files/usr/bin/python3']' returned non-zero exit status 1.
  Checking for Rust toolchain....
  Running `maturin pep517 write-dist-info --metadata-directory /data/data/com.termux/files/usr/tmp/pip-modern-metadata-osjlu_8g --interpreter /data/data/com.termux/files/usr/bin/python3`
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

This seems to stem from ruff rather than python-lsp-ruff. Can you verify this by installing/upgrading ruff explicitly using pip install --upgrade ruff?

Yes indeed, it's ruff itself failing to install