oconnor663 / blake3-py

Python bindings for the BLAKE3 cryptographic hash function
Other
139 stars 12 forks source link

Please cut new release of blake3 to fix maturin build error #22

Closed robd003 closed 2 years ago

robd003 commented 2 years ago

Could you please cut a new release that includes the this commit https://github.com/oconnor663/blake3-py/commit/87b457fccb5b4aec9b6d0a284a4b3a3c44a801fc

Thanks!

Error:

Collecting blake3
  Downloading blake3-0.2.0.tar.gz (33 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /root/.cache/pypoetry/virtualenvs/sanic-pIZXgjO4-py3.10/bin/python /root/.cache/pypoetry/virtualenvs/sanic-pIZXgjO4-py3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp8b9h7wi_
         cwd: /tmp/pip-install-7r5nrcxv/blake3_55702c73c4e04459aeb27d52bbbb201f
    Complete output (7 lines):
    Checking for Rust toolchain....
    Running `maturin pep517 write-dist-info --metadata-directory /tmp/pip-modern-metadata-aduv54rk --interpreter /root/.cache/pypoetry/virtualenvs/sanic-pIZXgjO4-py3.10/bin/python`
    ⚠️  Warning: Please use maturin in pyproject.toml with a version constraint, e.g. `requires = ["maturin>=0.11,<0.12"]`. This will become an error.
    💥 maturin failed
      Caused by: Cargo metadata failed. Does your crate compile with `cargo build`?
      Caused by: `cargo metadata` exited with an error:     Updating crates.io index
    Error running maturin: Command '['maturin', 'pep517', 'write-dist-info', '--metadata-directory', '/tmp/pip-modern-metadata-aduv54rk', '--interpreter', '/root/.cache/pypoetry/virtualenvs/sanic-pIZXgjO4-py3.10/bin/python']' returned non-zero exit status 1.
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c8/dc/40d740998936be074666acaf2d1f7c90959898272bf587377f1f65c86b7b/blake3-0.2.0.tar.gz#sha256=91794f3335062ff484aaef1ff028276c904b1eca0cccfea18e081c25b5f2c7d0 (from https://pypi.org/simple/blake3/). Command errored out with exit status 1: /root/.cache/pypoetry/virtualenvs/sanic-pIZXgjO4-py3.10/bin/python /root/.cache/pypoetry/virtualenvs/sanic-pIZXgjO4-py3.10/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp8b9h7wi_ Check the logs for full command output.
oconnor663 commented 2 years ago

Sure thing. To help me test this, how can I reproduce this failure? I just ran

pip install blake3 --no-binary=blake3

and also

pip install blake3 --no-binary=:all:

in clean virtualenvs, and both seem to succeed (on currrent Arch Linux).

robd003 commented 2 years ago

Sure, the build is failing on macOS 11 with Python 3.10 and version 1.55 of the rust toolchain + cargo

$ cargo build
    Updating crates.io index
error: failed to select a version for the requirement `pyo3 = "^0.14"`
candidate versions found which didn't match: 0.13.2, 0.13.1, 0.13.0, ...
location searched: crates.io index
required by package `blake3 v0.2.0 (/Users/robd/code/blake3-py)`
robd003 commented 2 years ago

Turns out it was an issue with the homebrew version of rust. I'm submitting a patch and macOS users should be fine after that.

oconnor663 commented 2 years ago

Good to know. In any case we did just cut a new release, v0.2.1.