bdist_wheel.py 1.1 KB

1234567891011121314151617181920212223242526
  1. from typing import TYPE_CHECKING
  2. from warnings import warn
  3. warn(
  4. "The 'wheel' package is no longer the canonical location of the 'bdist_wheel' "
  5. "command, and will be removed in a future release. Please update to setuptools "
  6. "v70.1 or later which contains an integrated version of this command.",
  7. FutureWarning,
  8. stacklevel=1,
  9. )
  10. if TYPE_CHECKING:
  11. from ._bdist_wheel import bdist_wheel as bdist_wheel
  12. else:
  13. try:
  14. # Better integration/compatibility with setuptools:
  15. # in the case new fixes or PEPs are implemented in setuptools
  16. # there is no need to backport them to the deprecated code base.
  17. # This is useful in the case of old packages in the ecosystem
  18. # that are still used but have low maintenance.
  19. from setuptools.command.bdist_wheel import bdist_wheel
  20. except ImportError:
  21. # Only used in the case of old setuptools versions.
  22. # If the user wants to get the latest fixes/PEPs,
  23. # they are encouraged to address the deprecation warning.
  24. from ._bdist_wheel import bdist_wheel as bdist_wheel