Skip to content

Commit

Permalink
Remove deprecated --universal2 cli option
Browse files Browse the repository at this point in the history
  • Loading branch information
messense committed May 20, 2023
1 parent c840a76 commit 3ade4f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
16 changes: 4 additions & 12 deletions src/build_options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,6 @@ pub struct BuildOptions {
#[arg(long)]
pub zig: bool,

/// Control whether to build universal2 wheel for macOS or not.
/// Only applies to macOS targets, do nothing otherwise.
#[arg(long)]
pub universal2: bool,

/// Cargo build options
#[command(flatten)]
pub cargo: CargoOptions,
Expand Down Expand Up @@ -510,13 +505,7 @@ impl BuildOptions {

let mut target_triple = self.target.clone();

let mut universal2 = self.universal2;
if universal2 {
eprintln!("⚠️ Warning: `--universal2` is deprecated, use `--target universal2-apple-darwin` instead");
} else if target_triple.as_deref() == Some("universal2-apple-darwin") {
universal2 = true;
target_triple = None;
}
let mut universal2 = target_triple.as_deref() == Some("universal2-apple-darwin");
// Also try to determine universal2 from ARCHFLAGS environment variable
if let Ok(arch_flags) = env::var("ARCHFLAGS") {
let arches: HashSet<&str> = arch_flags
Expand All @@ -541,6 +530,9 @@ impl BuildOptions {
_ => {}
}
};
if universal2 {
target_triple = None;
}

let target = Target::from_target_triple(target_triple)?;

Expand Down
1 change: 0 additions & 1 deletion src/develop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ pub fn develop(
skip_auditwheel: false,
#[cfg(feature = "zig")]
zig: false,
universal2: false,
cargo: CargoOptions {
target: target_triple,
..cargo_options
Expand Down

0 comments on commit 3ade4f2

Please sign in to comment.