Skip to content

Commit c428a57

Browse files
committed
Fix error when integrating with pip
1 parent bd37bfc commit c428a57

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

setuptools/command/egg_info.py

Lines changed: 2 additions & 1 deletion
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)