|
|
@ -292,11 +292,16 @@ def _recover_package_name(names):
|
|
|
|
# reconstruct the names
|
|
|
|
# reconstruct the names
|
|
|
|
name_parts = []
|
|
|
|
name_parts = []
|
|
|
|
package_names = []
|
|
|
|
package_names = []
|
|
|
|
|
|
|
|
in_brackets = False
|
|
|
|
for name in names:
|
|
|
|
for name in names:
|
|
|
|
if _is_package_name(name):
|
|
|
|
if _is_package_name(name) and not in_brackets:
|
|
|
|
if name_parts:
|
|
|
|
if name_parts:
|
|
|
|
package_names.append(",".join(name_parts))
|
|
|
|
package_names.append(",".join(name_parts))
|
|
|
|
name_parts = []
|
|
|
|
name_parts = []
|
|
|
|
|
|
|
|
if "[" in name:
|
|
|
|
|
|
|
|
in_brackets = True
|
|
|
|
|
|
|
|
if in_brackets and "]" in name:
|
|
|
|
|
|
|
|
in_brackets = False
|
|
|
|
name_parts.append(name)
|
|
|
|
name_parts.append(name)
|
|
|
|
package_names.append(",".join(name_parts))
|
|
|
|
package_names.append(",".join(name_parts))
|
|
|
|
return package_names
|
|
|
|
return package_names
|
|
|
@ -498,6 +503,7 @@ class Package:
|
|
|
|
# old pkg_resource will replace 'setuptools' with 'distribute' when it already installed
|
|
|
|
# old pkg_resource will replace 'setuptools' with 'distribute' when it already installed
|
|
|
|
if self._requirement.project_name == "distribute":
|
|
|
|
if self._requirement.project_name == "distribute":
|
|
|
|
self.package_name = "setuptools"
|
|
|
|
self.package_name = "setuptools"
|
|
|
|
|
|
|
|
self._requirement.project_name = "setuptools"
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
self.package_name = self._requirement.project_name
|
|
|
|
self.package_name = self._requirement.project_name
|
|
|
|
self._plain_package = True
|
|
|
|
self._plain_package = True
|
|
|
@ -639,7 +645,7 @@ def main():
|
|
|
|
"Please keep the version specifier, but remove the 'version' argument."
|
|
|
|
"Please keep the version specifier, but remove the 'version' argument."
|
|
|
|
)
|
|
|
|
)
|
|
|
|
# if the version specifier is provided by version, append that into the package
|
|
|
|
# if the version specifier is provided by version, append that into the package
|
|
|
|
packages[0] = Package(packages[0].package_name, version)
|
|
|
|
packages[0] = Package(to_native(packages[0]), version)
|
|
|
|
|
|
|
|
|
|
|
|
if module.params['editable']:
|
|
|
|
if module.params['editable']:
|
|
|
|
args_list = [] # used if extra_args is not used at all
|
|
|
|
args_list = [] # used if extra_args is not used at all
|
|
|
|