Skip to content

Commit

Permalink
Merge pull request #794 from messense/update-lddtree
Browse files Browse the repository at this point in the history
Properly handle lddtree error
  • Loading branch information
messense authored Feb 4, 2022
2 parents 3118069 + a5a364f commit 1f84465
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 27 deletions.
56 changes: 31 additions & 25 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ ignore = "0.4.18"
dialoguer = "0.9.0"
console = "0.15.0"
minijinja = "0.13.0"
lddtree = "0.2.5"
lddtree = "0.2.6"
cc = "1.0.72"
clap = { version = "3.0.13", features = ["derive", "env", "wrap_help"] }
clap_complete = "3.0.4"
Expand Down
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Fix missing Python submodule in wheel in [#772](https://github.com/PyO3/maturin/pull/772)
* Add support for specifying cargo manifest path in pyproject.toml in [#781](https://github.com/PyO3/maturin/pull/781)
* Add support for passing arguments to pep517 command via `MATURIN_PEP517_ARGS` env var in [#786](https://github.com/PyO3/maturin/pull/786)
* Fix auditwheel `No such file or directory` error when `LD_LIBRARY_PATH` contains non-existent paths in [#794](https://github.com/PyO3/maturin/pull/794)

## [0.12.6] - 2021-12-31

Expand Down
3 changes: 3 additions & 0 deletions src/auditwheel/audit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ pub enum AuditWheelError {
/// This platform tag isn't defined by auditwheel yet
#[error("{0} compatibility policy is not defined by auditwheel yet, pass `--skip-auditwheel` to proceed anyway")]
UndefinedPolicy(String),
/// Failed to analyze external shared library dependencies of the wheel
#[error("Failed to analyze external shared library dependencies of the wheel")]
DependencyAnalysisError(#[source] lddtree::Error),
}

#[derive(Clone, Debug)]
Expand Down
4 changes: 3 additions & 1 deletion src/auditwheel/repair.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ pub fn find_external_libs(
sysroot: PathBuf,
) -> Result<Vec<lddtree::Library>, AuditWheelError> {
let dep_analyzer = DependencyAnalyzer::new(sysroot);
let deps = dep_analyzer.analyze(artifact).unwrap();
let deps = dep_analyzer
.analyze(artifact)
.map_err(AuditWheelError::DependencyAnalysisError)?;
let mut ext_libs = Vec::new();
for (name, lib) in deps.libraries {
// Skip dynamic linker/loader and white-listed libs
Expand Down

0 comments on commit 1f84465

Please sign in to comment.