Skip to content

Commit

Permalink
Fix musllinux rpath for non-cffi bindings (#2233)
Browse files Browse the repository at this point in the history
  • Loading branch information
messense authored Sep 26, 2024
1 parent 7c76882 commit aba55db
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/build_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,8 +479,12 @@ impl BuildContext {
eprintln!(" {}", lib_path.display());
}

// Currently artifact .so file always resides at ${module_name}/${module_name}.so
let artifact_dir = self.module_name.split(".").collect::<PathBuf>();
let artifact_dir = match self.bridge() {
// cffi bindings that contains '.' in the module name will be split into directories
BridgeModel::Cffi => self.module_name.split(".").collect::<PathBuf>(),
// For other bindings artifact .so file usually resides at ${module_name}/${module_name}.so
_ => PathBuf::from(&self.module_name),
};
for artifact in artifacts {
let mut new_rpaths = patchelf::get_rpath(&artifact.path)?;
// TODO: clean existing rpath entries if it's not pointed to a location within the wheel
Expand Down

0 comments on commit aba55db

Please sign in to comment.