Compare requirements case insensitively.
Pip treats package names as case insensitive which has resulted in different cases being used in the various project requirements files. Use a case insensitive comparison when comparing a project against openstack/requirements to avoid invalid comparison failures. Change-Id: I59b3362ffb68d1c4662ac5d94919de47f0506218 Reviewed-on: https://review.openstack.org/25639 Reviewed-by: Khai Do <zaro0508@gmail.com> Reviewed-by: James E. Blair <corvus@inaugust.com> Approved: Jeremy Stanley <fungi@yuggoth.org> Reviewed-by: Jeremy Stanley <fungi@yuggoth.org> Tested-by: Jenkins
This commit is contained in:
parent
d8e1a4c7bd
commit
742e9cb9cc
@ -46,11 +46,11 @@ class RequirementsList(object):
|
||||
if line.startswith('-e'):
|
||||
continue
|
||||
req = pkg_resources.Requirement.parse(line)
|
||||
if req.project_name in self.reqs:
|
||||
if req.project_name.lower() in self.reqs:
|
||||
print("Duplicate requirement in %s: %s" %
|
||||
(self.name, str(req)))
|
||||
self.failed = True
|
||||
self.reqs[req.project_name] = req
|
||||
self.reqs[req.project_name.lower()] = req
|
||||
|
||||
def read_all_requirements(self):
|
||||
for fn in ['tools/pip-requires',
|
||||
@ -84,7 +84,7 @@ def main():
|
||||
|
||||
failed = False
|
||||
for req in head_reqs.reqs.values():
|
||||
name = req.project_name
|
||||
name = req.project_name.lower()
|
||||
if name in branch_reqs.reqs and req == branch_reqs.reqs[name]:
|
||||
continue
|
||||
if name not in os_reqs.reqs:
|
||||
|
Loading…
Reference in New Issue
Block a user