Skip to content

Commit 1ed356f

Browse files
committed
Add warning for universal wheels
1 parent 94ee160 commit 1ed356f

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Diff for: setuptools/command/bdist_wheel.py

+15-1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from wheel.wheelfile import WheelFile
2727

2828
from .. import Command, __version__
29+
from ..warnings import SetuptoolsDeprecationWarning
2930
from .egg_info import egg_info as egg_info_cls
3031

3132
from distutils import log
@@ -205,7 +206,7 @@ class bdist_wheel(Command):
205206
"g",
206207
"Group name used when creating a tar file [default: current group]",
207208
),
208-
("universal", None, "make a universal wheel [default: false]"),
209+
("universal", None, "*DEPRECATED* make a universal wheel [default: false]"),
209210
(
210211
"compression=",
211212
None,
@@ -285,6 +286,19 @@ def finalize_options(self) -> None:
285286
if val.lower() in ("1", "true", "yes"):
286287
self.universal = True
287288

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+
288302
if self.build_number is not None and not self.build_number[:1].isdigit():
289303
raise ValueError("Build tag (build-number) must start with a digit.")
290304

0 commit comments

Comments
 (0)