Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nxd-bom
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
nxd-bom
Commits
d0540ad3
Commit
d0540ad3
authored
Jun 08, 2023
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
11611163
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
nxdbom/__init__.py
nxdbom/__init__.py
+6
-0
No files found.
nxdbom/__init__.py
View file @
d0540ad3
...
...
@@ -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
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment