Skip to contentSkip to conversation

utils/scanpypi: use a set comprehension for dependencies

PATCH Applied James Hilliard 2 participants 2 messages Nov 30, 2023 – Feb 7, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 utils/scanpypi: use a set comprehension for dependencies

This ensures that we don't have duplicate dependencies.

---
 utils/scanpypi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
utils/scanpypi +2 -2
index 021c99a172..5a58550145 100755
@@ -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))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw
Quoted 6 lines · On Thu, 30 Nov 2023 14:19:10 -0700 James Hilliard <[email protected]>…

This ensures that we don't have duplicate dependencies.

---
 utils/scanpypi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot