messense / nh3

Python binding to Ammonia HTML sanitizer Rust crate
https://nh3.readthedocs.io
MIT License
260 stars 8 forks source link

support python312? #52

Closed RocherKong closed 2 months ago

RocherKong commented 2 months ago

help,how to adapt python version 312? pip download from pypi website fail.

pip download -r .\requirement3.txt --platform=linux_x86_64 --no-deps Collecting nh3==0.2.18 (from -r .\requirement3.txt (line 1)) Downloading nh3-0.2.18.tar.gz (15 kB) 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 ╰─> [6 lines of output]

  Cargo, the Rust package manager, is not installed or is not on PATH.
  This package requires Rust and Cargo to compile extensions. Install it through
  the system's package manager or via https://rustup.rs/

  Checking for Rust toolchain....
  [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.

messense commented 2 months ago

You were trying to download for linux_x86_64 while we provide manylinux_2_17_x86_64.

Try pip download --no-deps --only-binary :all: --platform manylinux_2_17_x86_64 nh3, or install a working Rust toolchain to compile from source.