utils/scanpypi: use a set comprehension for dependencies

This ensures that we don't have duplicate dependencies.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
James Hilliard 2023-11-30 14:19:10 -07:00 committed by Thomas Petazzoni
parent 55c6ae5656
commit c12e1c7b59

View File

@ -411,8 +411,8 @@ class BuildrootPackage():
for req in self.pkg_req]
# get rid of commented lines and also strip the package strings
self.pkg_req = [item.strip() for item in self.pkg_req
if len(item) > 0 and item[0] != '#']
self.pkg_req = {item.strip() for item in self.pkg_req
if len(item) > 0 and item[0] != '#'}
req_not_found = self.pkg_req
self.pkg_req = list(map(pkg_buildroot_name, self.pkg_req))