Commit d0540ad3 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 11611163
......@@ -35,6 +35,7 @@ from os.path import basename
from glob import glob
from collections import namedtuple
from urllib.parse import unquote
import email.parser
# PkgInfo represents information about a package
......@@ -82,6 +83,11 @@ def bom_software(installed_software_path): # -> {} (name,kind) -> PkgInfo
url = '%s/%s-%s.tar.gz' % (nxdbase, name, v)
else:
url = 'https://pypi.org/project/%s/%s/' % (name, v)
with open('%s/EGG-INFO/PKG-INFO' % urlpath) as f:
p = email.parser.Parser()
meta = p.parse(f, headersonly=True)
license = meta['license']
else:
raise NotImplementedError('TODO url for kind %r (urlpath: %r)' % (kind, urlpath))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment