Skip to content

Commit

Permalink
Fix error when integrating with pip (#3823)
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Feb 14, 2023
2 parents bd37bfc + 3ed7b70 commit 19cbbad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions changelog.d/3823.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixes ``egg_info`` code path triggered during integration with ``pip``.
3 changes: 2 additions & 1 deletion setuptools/command/egg_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,8 @@ def finalize_options(self):
# to the version info
#
pd = self.distribution._patched_dist
if pd is not None and pd.key == self.egg_name.lower():
key = getattr(pd, "key", None) or getattr(pd, "name", None)
if pd is not None and key == self.egg_name.lower():
pd._version = self.egg_version
pd._parsed_version = packaging.version.Version(self.egg_version)
self.distribution._patched_dist = None
Expand Down

0 comments on commit 19cbbad

Please sign in to comment.