aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xutils/scanpypi4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/scanpypi b/utils/scanpypi
index 765bfdcf6a..88fcb4a8a6 100755
--- a/utils/scanpypi
+++ b/utils/scanpypi
@@ -293,6 +293,10 @@ class BuildrootPackage():
self.pkg_req = self.setup_metadata['install_requires']
self.pkg_req = [re.sub('([-.\w]+).*', r'\1', req)
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 item[0] != '#']
+
req_not_found = self.pkg_req
self.pkg_req = map(pkg_buildroot_name, self.pkg_req)
pkg_tuples = zip(req_not_found, self.pkg_req)