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

Error messages for bad cargo/rust environment during PEP517 install #152

Merged
merged 1 commit into from
Jun 27, 2019
Merged

Error messages for bad cargo/rust environment during PEP517 install #152

merged 1 commit into from
Jun 27, 2019

Conversation

ijl
Copy link
Contributor

@ijl ijl commented Jun 26, 2019

The error output from pip is otherwise not understandable by
a user who does not know this package needs Rust or what Rust is.

Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Complete output from command ... pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel ...
ERROR: 💥 pyo3-pack failed
Cargo metadata failed: No such file or directory (os error 2)
...
subprocess.CalledProcessError: Command '['pyo3-pack', 'pep517', 'write-dist-info', ... ' returned non-zero exit status 1

#2

@ijl
Copy link
Contributor Author

ijl commented Jun 26, 2019

I don't know whether all bindings require nightly. If so that is something to check as well.

@konstin
Copy link
Member

konstin commented Jun 27, 2019

Great idea, thank you!

I don't know whether all bindings require nightly. If so that is something to check as well.

Only pyo3 requires nightly. pyo3 already prints an understandable error message, even though it might be better to check this earlier:

process didn't exit successfully: `/home/konsti/pyo3/target/debug/build/pyo3-46d57cafcc76894a/build-script-build` (exit code: 101)
--- stderr
Error: pyo3 requires a nightly or dev version of Rust.
Installed version is: 1.35.0 (2019-05-20). Minimum required: 1.34.0-nightly (2019-02-06).
thread 'main' panicked at 'Aborting compilation due to incompatible compiler.', build.rs:556:17
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

pyo3_pack/__init__.py Show resolved Hide resolved
The error output from pip is otherwise not understandable by
a user who does not know this package needs Rust or what Rust is.

  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Complete output from command ... pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel ...
    ERROR: 💥 pyo3-pack failed
    Cargo metadata failed: No such file or directory (os error 2)
    ...
    subprocess.CalledProcessError: Command '['pyo3-pack', 'pep517', 'write-dist-info', ... ' returned non-zero exit status 1
@konstin konstin merged commit 248d2e5 into PyO3:master Jun 27, 2019
@ijl ijl deleted the 517-cargo branch June 27, 2019 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants