Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to install on Termux #4436

Closed
edshamis opened this issue May 15, 2023 · 4 comments · Fixed by #4439
Closed

Fails to install on Termux #4436

edshamis opened this issue May 15, 2023 · 4 comments · Fixed by #4439
Labels
bug Something isn't working release Related to the release process

Comments

@edshamis
Copy link

There's a dedicated ruff package for Termux, but ruff-lsp and python-lsp-ruff fail to install for the same reason

❯ pip install --upgrade ruff
Collecting 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-og631z7k/ruff_b22440ecd7e94053a309acbac4637fe9/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-og631z7k/ruff_b22440ecd7e94053a309acbac4637fe9/local_dependencies/ruff

      Caused by:
        failed to parse manifest at `/data/data/com.termux/files/usr/tmp/pip-install-og631z7k/ruff_b22440ecd7e94053a309acbac4637fe9/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 c
rate 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-9wm3nkcx', '--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-9wm3nkcx --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.

@edshamis
Copy link
Author

Reported upstream: PyO3/maturin#1609

@charliermarsh charliermarsh added bug Something isn't working release Related to the release process labels May 15, 2023
MichaReiser pushed a commit that referenced this issue Jul 27, 2023
docs.rs failed to build the documentation of the recently released
rustpython-parser 0.2.0 because the build.rs script couldn't write the
parser.rs file because docs.rs builds the documentation in a sandbox
with a read-only filesystem.

This commit fixes this by writing the parser.rs file to the cargo output
directory instead, as recommended by the docs.rs documentation.[1]

Fixes #4436.

[1]: https://docs.rs/about/builds#read-only-directories
@bmeares
Copy link

bmeares commented Jun 21, 2024

Do you know where I can find documentation on how to install ruff in Termux?

@AndrewLauu
Copy link

Do you know where I can find documentation on how to install ruff in Termux?

You may need to use pkg install ruff in Termux instead of pip

@egeres
Copy link

egeres commented Sep 26, 2024

pkg install ruff worked for me, as of version 0.6.7 they seem to provide binaries for ARMv7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working release Related to the release process
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants