Skip to content

Commit

Permalink
fix(scripts): setuptools v71 removed the need for extern (#15717) (#1…
Browse files Browse the repository at this point in the history
…5741)

## `cherry-pick` afaa717

Must update `chore_release-7.4.0` so that Linux app builds work due to a
change in setuptools. To understand the changes see #15717

Co-authored-by: Ryan Howard <[email protected]>
  • Loading branch information
y3rsh and ryanthecoder authored Jul 22, 2024
1 parent 6fe994e commit 305f00e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripts/python_build_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,18 @@ 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
from setuptools.extern import packaging
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
from pkg_resources.extern import packaging
Expand Down

0 comments on commit 305f00e

Please sign in to comment.