Skip to content

Commit

Permalink
setuptools v71 removed the need for extern
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Jul 19, 2024
1 parent 9379b4a commit d6bfd49
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/python_build_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ def normalize_version(package, project, extra_tag='', git_dir=None):
# we try all the possible ways to find it.
try:
# new way
from setuptools.extern import packaging
import setuptools
major, minor, patch = [int(x, 10) for x in setuptools.__version__.split('.')]
if major < 71:
from setuptools.extern import packaging
else:
import packaging
except ImportError:
# old way
from pkg_resources.extern import packaging
Expand Down

0 comments on commit d6bfd49

Please sign in to comment.