Skip to content

Commit c2c9e70

Browse files
authored
Remove deprecated --universal2 cli option (#1620)
1 parent 701e3ae commit c2c9e70

File tree

6 files changed

+6
-27
lines changed

6 files changed

+6
-27
lines changed

guide/src/develop.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Options:
8989
Outputs a future incompatibility report at the end of the build (unstable)
9090
9191
-h, --help
92-
Print help information (use `-h` for a summary)
92+
Print help (see a summary with '-h')
9393
```
9494

9595
## PEP 660 Editable Installs

guide/src/distribution.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ Options:
126126
127127
Make sure you installed zig with `pip install maturin[zig]`
128128
129-
--universal2
130-
Control whether to build universal2 wheel for macOS or not. Only applies to macOS targets,
131-
do nothing otherwise
132-
133129
-q, --quiet
134130
Do not print cargo log messages
135131
@@ -190,7 +186,7 @@ Options:
190186
Outputs a future incompatibility report at the end of the build (unstable)
191187
192188
-h, --help
193-
Print help information (use `-h` for a summary)
189+
Print help (see a summary with '-h')
194190
```
195191

196192
### Cross Compiling

src/build_options.rs

+4-12
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,6 @@ pub struct BuildOptions {
185185
#[arg(long)]
186186
pub zig: bool,
187187

188-
/// Control whether to build universal2 wheel for macOS or not.
189-
/// Only applies to macOS targets, do nothing otherwise.
190-
#[arg(long)]
191-
pub universal2: bool,
192-
193188
/// Cargo build options
194189
#[command(flatten)]
195190
pub cargo: CargoOptions,
@@ -510,13 +505,7 @@ impl BuildOptions {
510505

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

513-
let mut universal2 = self.universal2;
514-
if universal2 {
515-
eprintln!("⚠️ Warning: `--universal2` is deprecated, use `--target universal2-apple-darwin` instead");
516-
} else if target_triple.as_deref() == Some("universal2-apple-darwin") {
517-
universal2 = true;
518-
target_triple = None;
519-
}
508+
let mut universal2 = target_triple.as_deref() == Some("universal2-apple-darwin");
520509
// Also try to determine universal2 from ARCHFLAGS environment variable
521510
if let Ok(arch_flags) = env::var("ARCHFLAGS") {
522511
let arches: HashSet<&str> = arch_flags
@@ -541,6 +530,9 @@ impl BuildOptions {
541530
_ => {}
542531
}
543532
};
533+
if universal2 {
534+
target_triple = None;
535+
}
544536

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

src/develop.rs

-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ pub fn develop(
6060
skip_auditwheel: false,
6161
#[cfg(feature = "zig")]
6262
zig: false,
63-
universal2: false,
6463
cargo: CargoOptions {
6564
target: target_triple,
6665
..cargo_options

tests/cmd/build.stdout

-4
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ Options:
5656

5757
Make sure you installed zig with `pip install maturin[zig]`
5858

59-
--universal2
60-
Control whether to build universal2 wheel for macOS or not. Only applies to macOS targets,
61-
do nothing otherwise
62-
6359
-q, --quiet
6460
Do not print cargo log messages
6561

tests/cmd/publish.stdout

-4
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ Options:
9090

9191
Make sure you installed zig with `pip install maturin[zig]`
9292

93-
--universal2
94-
Control whether to build universal2 wheel for macOS or not. Only applies to macOS targets,
95-
do nothing otherwise
96-
9793
-q, --quiet
9894
Do not print cargo log messages
9995

0 commit comments

Comments
 (0)