|
26 | 26 | from wheel.wheelfile import WheelFile |
27 | 27 |
|
28 | 28 | from .. import Command, __version__ |
| 29 | +from ..warnings import SetuptoolsDeprecationWarning |
29 | 30 | from .egg_info import egg_info as egg_info_cls |
30 | 31 |
|
31 | 32 | from distutils import log |
@@ -205,7 +206,7 @@ class bdist_wheel(Command): |
205 | 206 | "g", |
206 | 207 | "Group name used when creating a tar file [default: current group]", |
207 | 208 | ), |
208 | | - ("universal", None, "make a universal wheel [default: false]"), |
| 209 | + ("universal", None, "*DEPRECATED* make a universal wheel [default: false]"), |
209 | 210 | ( |
210 | 211 | "compression=", |
211 | 212 | None, |
@@ -285,6 +286,19 @@ def finalize_options(self) -> None: |
285 | 286 | if val.lower() in ("1", "true", "yes"): |
286 | 287 | self.universal = True |
287 | 288 |
|
| 289 | + if self.universal: |
| 290 | + SetuptoolsDeprecationWarning.emit( |
| 291 | + "bdist_wheel.universal is deprecated", |
| 292 | + """ |
| 293 | + With Python 2.7 end-of-life, support for building universal wheels |
| 294 | + (i.e., wheels that support both Python 2 and Python 3) |
| 295 | + is being obviated. |
| 296 | + Please discontinue using this option, or if you still need it, |
| 297 | + file an issue with pypa/setuptools describing your use case. |
| 298 | + """, |
| 299 | + due_date=(2025, 8, 30), # Introduced in 2024-08-30 |
| 300 | + ) |
| 301 | + |
288 | 302 | if self.build_number is not None and not self.build_number[:1].isdigit(): |
289 | 303 | raise ValueError("Build tag (build-number) must start with a digit.") |
290 | 304 |
|
|
0 commit comments