From d2e29fccdffbbd9e9a0a9749d91e368a2b091910 Mon Sep 17 00:00:00 2001 From: Yegor Yefremov Date: Thu, 18 Jan 2018 11:41:49 +0100 Subject: [PATCH] scanpypi: get rid of commented lines and also strip the package strings Signed-off-by: Yegor Yefremov Signed-off-by: Thomas Petazzoni --- utils/scanpypi | 4 ++++ 1 file changed, 4 insertions(+) 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) -- 2.30.2