diff --git a/jupyter_packaging/setupbase.py b/jupyter_packaging/setupbase.py index f0ebbf4..ddc4b13 100644 --- a/jupyter_packaging/setupbase.py +++ b/jupyter_packaging/setupbase.py @@ -45,9 +45,12 @@ from setuptools.command.sdist import sdist try: - from wheel.bdist_wheel import bdist_wheel + from setuptools.command.bdist_wheel import bdist_wheel except ImportError: # pragma: no cover - bdist_wheel = None + try: + from wheel.bdist_wheel import bdist_wheel + except ImportError: + bdist_wheel = None if sys.platform == "win32": # pragma: no cover from subprocess import list2cmdline diff --git a/pyproject.toml b/pyproject.toml index b6739fe..0741903 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -80,5 +80,8 @@ filterwarnings= [ # Ignore our own deprecation warnings. "ignore:.*:deprecation.DeprecatedWarning", # Ignore warning raised when importing setuptools.command.develop. - "ignore:pkg_resources is deprecated as an API:DeprecationWarning" + "ignore:pkg_resources is deprecated as an API:DeprecationWarning", + # bdist_wheel moved from wheel 0.44+ to setuptools 0.70.1+. + # We already handle it but wheel 0.44 could still emit the warning with an older setuptools. + "ignore:The 'wheel' package is no longer the canonical location of the 'bdist_wheel' command:DeprecationWarning", ]