mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 20:31:27 -07:00
pip: Fix the mistake replacement from 'distribute' to 'setuptools' (#47403)
* Fix the mistake replace from distribute to setuptools * Add a testcase for this bug
This commit is contained in:
parent
3a9eadb22f
commit
93c5781f61
2 changed files with 14 additions and 2 deletions
|
@ -513,8 +513,8 @@ class Package:
|
|||
name_string = separator.join((name_string, version_string))
|
||||
try:
|
||||
self._requirement = Requirement.parse(name_string)
|
||||
# old pkg_resource will replace 'setuptools' with 'distribute' when it already installed
|
||||
if self._requirement.project_name == "distribute":
|
||||
# old pkg_resource will replace 'setuptools' with 'distribute' when it's already installed
|
||||
if self._requirement.project_name == "distribute" and "setuptools" in name_string:
|
||||
self.package_name = "setuptools"
|
||||
self._requirement.project_name = "setuptools"
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue