Skip to content

Commit

Permalink
can't depend on packaing being v24
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Jul 19, 2024
1 parent d6bfd49 commit 6b31903
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/python_build_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,17 @@ def normalize_version(package, project, extra_tag='', git_dir=None):
# the way they vendor dependencies, like the packaging module that
# provides the way to normalize version numbers for wheel file names. So
# we try all the possible ways to find it.
# Since 71.0.0 they have removed the need for extern
# So depending on the version of 3.10 you're building on you may or may not
# need to use the extern or import it directly
try:
# new way
import setuptools
major, minor, patch = [int(x, 10) for x in setuptools.__version__.split('.')]
if major < 71:
# new way
from setuptools.extern import packaging
else:
# new new way
import packaging
except ImportError:
# old way
Expand Down

0 comments on commit 6b31903

Please sign in to comment.