Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanthecoder committed Jul 19, 2024
1 parent d6bfd49 commit 0f0fb6a
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions scripts/python_build_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,15 @@ 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 this system has been removed and we're back to just
# straight up import the package
try:
# new way
import setuptools
major, minor, patch = [int(x, 10) for x in setuptools.__version__.split('.')]
if major < 71:
from setuptools.extern import packaging
else:
try:
# new new way
import packaging
except ImportError:
# new way
from setuptools.extern import packaging
except ImportError:
# old way
from pkg_resources.extern import packaging
Expand Down

0 comments on commit 0f0fb6a

Please sign in to comment.