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

Don't require pip error messages to be utf-8 encoding #953

Merged
merged 1 commit into from
Jun 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* **Breaking Change**: Drop support for python 3.6, which is end of life
* Fix incompatibility with cibuildwheel for 32-bit Windows in [#951](https://github.com/PyO3/maturin/pull/951)
* Don't require `pip` error messages to be utf-8 encoding in [#953](https://github.com/PyO3/maturin/pull/953)

## [0.12.19] - 2022-06-05

Expand Down
7 changes: 3 additions & 4 deletions src/develop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::Target;
use anyhow::{anyhow, bail, Context, Result};
use std::path::Path;
use std::process::Command;
use std::str;
use tempfile::TempDir;

/// Installs a crate by compiling it and copying the shared library to site-packages.
Expand Down Expand Up @@ -91,15 +90,15 @@ pub fn develop(
venv_dir.display(),
&command,
output.status,
str::from_utf8(&output.stdout)?.trim(),
str::from_utf8(&output.stderr)?.trim(),
String::from_utf8_lossy(&output.stdout).trim(),
String::from_utf8_lossy(&output.stderr).trim(),
);
}
if !output.stderr.is_empty() {
eprintln!(
"⚠️ Warning: pip raised a warning running {:?}:\n{}",
&command,
str::from_utf8(&output.stderr)?.trim(),
String::from_utf8_lossy(&output.stderr).trim(),
);
}
println!(
Expand Down