2
1
Эх сурвалжийг харах

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>
James Hilliard 1 жил өмнө
parent
commit
c12e1c7b59
1 өөрчлөгдсөн 2 нэмэгдсэн , 2 устгасан
  1. 2 2
      utils/scanpypi

+ 2 - 2
utils/scanpypi

@@ -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))