Skip to content

Commit

Permalink
scanpypi: get rid of commented lines and also strip the package strings
Browse files Browse the repository at this point in the history
Signed-off-by: Yegor Yefremov <[email protected]>
Signed-off-by: Thomas Petazzoni <[email protected]>
  • Loading branch information
yegorich authored and tpetazzoni committed Jan 18, 2018
1 parent 5a9a95d commit d2e29fc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions utils/scanpypi
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d2e29fc

Please sign in to comment.