fosslight-dependency 4.1.5__py3-none-any.whl → 4.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- fosslight_dependency/package_manager/Pub.py +21 -19
- {fosslight_dependency-4.1.5.dist-info → fosslight_dependency-4.1.6.dist-info}/METADATA +2 -1
- {fosslight_dependency-4.1.5.dist-info → fosslight_dependency-4.1.6.dist-info}/RECORD +10 -10
- {fosslight_dependency-4.1.5.dist-info → fosslight_dependency-4.1.6.dist-info}/Apache-2.0.txt +0 -0
- {fosslight_dependency-4.1.5.dist-info → fosslight_dependency-4.1.6.dist-info}/LICENSE +0 -0
- {fosslight_dependency-4.1.5.dist-info → fosslight_dependency-4.1.6.dist-info}/LicenseRef-3rd_party_licenses.txt +0 -0
- {fosslight_dependency-4.1.5.dist-info → fosslight_dependency-4.1.6.dist-info}/MIT.txt +0 -0
- {fosslight_dependency-4.1.5.dist-info → fosslight_dependency-4.1.6.dist-info}/WHEEL +0 -0
- {fosslight_dependency-4.1.5.dist-info → fosslight_dependency-4.1.6.dist-info}/entry_points.txt +0 -0
- {fosslight_dependency-4.1.5.dist-info → fosslight_dependency-4.1.6.dist-info}/top_level.txt +0 -0
@@ -10,10 +10,11 @@ import re
|
|
10
10
|
import shutil
|
11
11
|
import yaml
|
12
12
|
import subprocess
|
13
|
+
from askalono import identify
|
13
14
|
import fosslight_util.constant as constant
|
14
15
|
import fosslight_dependency.constant as const
|
15
16
|
from fosslight_dependency._package_manager import PackageManager
|
16
|
-
from fosslight_dependency._package_manager import
|
17
|
+
from fosslight_dependency._package_manager import get_url_to_purl
|
17
18
|
from fosslight_dependency.dependency_item import DependencyItem, change_dependson_to_purl
|
18
19
|
from fosslight_util.oss_item import OssItem
|
19
20
|
|
@@ -27,6 +28,7 @@ class Pub(PackageManager):
|
|
27
28
|
input_file_name = 'tmp_flutter_oss_licenses.json'
|
28
29
|
tmp_dir = "fl_dependency_tmp_dir"
|
29
30
|
cur_path = ''
|
31
|
+
pkg_source_list = {}
|
30
32
|
|
31
33
|
def __init__(self, input_dir, output_dir):
|
32
34
|
super().__init__(self.package_manager_name, self.dn_url, input_dir, output_dir)
|
@@ -92,6 +94,7 @@ class Pub(PackageManager):
|
|
92
94
|
if dep_key not in self.relation_tree:
|
93
95
|
self.relation_tree[dep_key] = []
|
94
96
|
self.relation_tree[dep_key].extend(p['dependencies'])
|
97
|
+
self.pkg_source_list[dep_key] = p['source']
|
95
98
|
|
96
99
|
for i in self.relation_tree:
|
97
100
|
tmp_dep = []
|
@@ -110,10 +113,9 @@ class Pub(PackageManager):
|
|
110
113
|
with open(f_name, 'r', encoding='utf8') as pub_file:
|
111
114
|
json_f = json.load(pub_file)
|
112
115
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
for json_data in json_f:
|
116
|
+
purl_dict = {}
|
117
|
+
for json_data in json_f:
|
118
|
+
try:
|
117
119
|
dep_item = DependencyItem()
|
118
120
|
oss_item = OssItem()
|
119
121
|
oss_origin_name = json_data['name']
|
@@ -133,18 +135,9 @@ class Pub(PackageManager):
|
|
133
135
|
purl_dict[f'{oss_origin_name}({oss_item.version})'] = dep_item.purl
|
134
136
|
license_txt = json_data['license']
|
135
137
|
if license_txt is not None:
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
license_name_with_license_scanner = check_and_run_license_scanner(self.platform,
|
141
|
-
self.license_scanner_bin,
|
142
|
-
tmp_license_txt_file_name)
|
143
|
-
|
144
|
-
if license_name_with_license_scanner != "":
|
145
|
-
oss_item.license = license_name_with_license_scanner
|
146
|
-
else:
|
147
|
-
oss_item.license = ''
|
138
|
+
detect_askalono = identify(license_txt)
|
139
|
+
if detect_askalono.score > 0.7:
|
140
|
+
oss_item.license = detect_askalono.name
|
148
141
|
|
149
142
|
if self.direct_dep:
|
150
143
|
if oss_origin_name not in self.total_dep_list:
|
@@ -159,11 +152,20 @@ class Pub(PackageManager):
|
|
159
152
|
|
160
153
|
if f'{oss_origin_name}({oss_item.version})' in self.relation_tree:
|
161
154
|
dep_item.depends_on_raw = self.relation_tree[f'{oss_origin_name}({oss_item.version})']
|
155
|
+
if f'{oss_origin_name}({oss_item.version})' in self.pkg_source_list:
|
156
|
+
pkg_source = self.pkg_source_list[f'{oss_origin_name}({oss_item.version})']
|
157
|
+
if pkg_source in ['git', 'path']:
|
158
|
+
oss_item.download_location = json_data['repository']
|
159
|
+
if oss_item.download_location is None:
|
160
|
+
oss_item.download_location = json_data['homepage']
|
161
|
+
if oss_item.download_location is None:
|
162
|
+
oss_item.download_location = ''
|
163
|
+
oss_item.comment = pkg_source
|
162
164
|
|
163
165
|
dep_item.oss_items.append(oss_item)
|
164
166
|
self.dep_items.append(dep_item)
|
165
|
-
|
166
|
-
|
167
|
+
except Exception as e:
|
168
|
+
logger.error(f"Fail to parse pub oss information: {e}")
|
167
169
|
if self.direct_dep:
|
168
170
|
self.dep_items = change_dependson_to_purl(purl_dict, self.dep_items)
|
169
171
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: fosslight-dependency
|
3
|
-
Version: 4.1.
|
3
|
+
Version: 4.1.6
|
4
4
|
Summary: FOSSLight Dependency Scanner
|
5
5
|
Home-page: https://github.com/fosslight/fosslight_dependency_scanner
|
6
6
|
Author: LG Electronics
|
@@ -27,6 +27,7 @@ Requires-Dist: defusedxml
|
|
27
27
|
Requires-Dist: packageurl-python
|
28
28
|
Requires-Dist: igraph
|
29
29
|
Requires-Dist: matplotlib
|
30
|
+
Requires-Dist: pyaskalono
|
30
31
|
|
31
32
|
<!--
|
32
33
|
Copyright (c) 2021 LG Electronics
|
@@ -18,7 +18,7 @@ fosslight_dependency/package_manager/Helm.py,sha256=ucx2Y0tWX37UHIzIGaRyTe7uQ2vl
|
|
18
18
|
fosslight_dependency/package_manager/Maven.py,sha256=JXiP8LwQZ10tf1l0Qgd4fvmv1RcVn52_PiMx6sTpSKo,10329
|
19
19
|
fosslight_dependency/package_manager/Npm.py,sha256=hwKC08m05KlHgfQpPX7lnDEJC-A7WKF9OniYW4n9TDM,10638
|
20
20
|
fosslight_dependency/package_manager/Nuget.py,sha256=FGD5tV1mTBl3G9mxWWnoMwLZUiSW7VCcHS7FxhCqU1g,9334
|
21
|
-
fosslight_dependency/package_manager/Pub.py,sha256=
|
21
|
+
fosslight_dependency/package_manager/Pub.py,sha256=ZsBSEyYkdIQCFCbc9OeAf5-hAw2oY_fA-KDvnVi9z_E,10299
|
22
22
|
fosslight_dependency/package_manager/Pypi.py,sha256=7eBB5ko4HhRhby5txo9NXZl6td1O_8k11v8R9FwxygU,16254
|
23
23
|
fosslight_dependency/package_manager/Swift.py,sha256=rAGecP705HJQGBQUj_4ssyty_lDF4YwTt7ymjso0-VQ,6793
|
24
24
|
fosslight_dependency/package_manager/Unity.py,sha256=LoyWCMa6R3x0VCsTH1EEJ7FQmYsraCDnoHZUHCmYeiU,4708
|
@@ -26,12 +26,12 @@ fosslight_dependency/package_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeu
|
|
26
26
|
fosslight_dependency/third_party/askalono/askalono.exe,sha256=NyngElHbrg3zLFRVwn6fPDZE_EDAEb1N8tiwWoCm4pQ,4743680
|
27
27
|
fosslight_dependency/third_party/askalono/askalono_macos,sha256=cYSNXhAQpkdd8lkgnY5skNeDmU_8DIuP84eFi0OXKkE,5589868
|
28
28
|
fosslight_dependency/third_party/nomos/nomossa,sha256=oFF9I-fhug6AVNyFnWeVXwDRin6NWSvk1g7mHBotB3Q,866408
|
29
|
-
fosslight_dependency-4.1.
|
30
|
-
fosslight_dependency-4.1.
|
31
|
-
fosslight_dependency-4.1.
|
32
|
-
fosslight_dependency-4.1.
|
33
|
-
fosslight_dependency-4.1.
|
34
|
-
fosslight_dependency-4.1.
|
35
|
-
fosslight_dependency-4.1.
|
36
|
-
fosslight_dependency-4.1.
|
37
|
-
fosslight_dependency-4.1.
|
29
|
+
fosslight_dependency-4.1.6.dist-info/Apache-2.0.txt,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
30
|
+
fosslight_dependency-4.1.6.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
31
|
+
fosslight_dependency-4.1.6.dist-info/LicenseRef-3rd_party_licenses.txt,sha256=EcsFt7aE1rp3OXAdJgmXayfOZdpRdBMcmRnyoqWMCsw,95687
|
32
|
+
fosslight_dependency-4.1.6.dist-info/METADATA,sha256=gI4z5TG8NOQuKlFjhZRZAvgEUyi3FPNHJOz_Bb8Cjzw,4982
|
33
|
+
fosslight_dependency-4.1.6.dist-info/MIT.txt,sha256=9cx4CbArgByWvkoEZNqpzbpJgA9TUe2D62rMocQpgfs,1082
|
34
|
+
fosslight_dependency-4.1.6.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
35
|
+
fosslight_dependency-4.1.6.dist-info/entry_points.txt,sha256=e1QZbnCrQvfbwe9L6PxXnkRZMhl-PSo0QyUes0dGjU8,91
|
36
|
+
fosslight_dependency-4.1.6.dist-info/top_level.txt,sha256=Jc0V7VcVCH0TEM8ksb8dwroTYz4AmRaQnlr3FB71Hcs,21
|
37
|
+
fosslight_dependency-4.1.6.dist-info/RECORD,,
|
{fosslight_dependency-4.1.5.dist-info → fosslight_dependency-4.1.6.dist-info}/Apache-2.0.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{fosslight_dependency-4.1.5.dist-info → fosslight_dependency-4.1.6.dist-info}/entry_points.txt
RENAMED
File without changes
|
File without changes
|