Skip to content

Commit

Permalink
Add bdist_wheel import try from setuptools
Browse files Browse the repository at this point in the history
As of setuptools v70.1, bdist_wheel is a part of setuptools and is being
deprecated from wheel.
  • Loading branch information
OCopping committed Aug 22, 2024
1 parent 0952d4f commit 7a051da
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions src/setuptools_dso/dsocmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,19 @@
import multiprocessing as MP
import logging as log

try:
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
except ImportError:
_bdist_wheel = None
def _import_bdist_wheel():
global _bdist_wheel
try:
from setuptools.command import bdist_wheel as _bdist_wheel
return
except ImportError:
pass
try:
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
except ImportError:
_bdist_wheel = None

_import_bdist_wheel()

from setuptools import Command, Distribution, Extension as _Extension
from setuptools.command.build_ext import build_ext as _build_ext
Expand Down

0 comments on commit 7a051da

Please sign in to comment.