Skip to content

Commit 19cbbad

Browse files
committed
Fix error when integrating with pip (#3823)
2 parents bd37bfc + 3ed7b70 commit 19cbbad

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

changelog.d/3823.misc.rst

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixes ``egg_info`` code path triggered during integration with ``pip``.

setuptools/command/egg_info.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,8 @@ def finalize_options(self):
250250
# to the version info
251251
#
252252
pd = self.distribution._patched_dist
253-
if pd is not None and pd.key == self.egg_name.lower():
253+
key = getattr(pd, "key", None) or getattr(pd, "name", None)
254+
if pd is not None and key == self.egg_name.lower():
254255
pd._version = self.egg_version
255256
pd._parsed_version = packaging.version.Version(self.egg_version)
256257
self.distribution._patched_dist = None

0 commit comments

Comments
 (0)