fosslight-scanner 2.1.0__tar.gz → 2.1.2__tar.gz
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_scanner-2.1.0 → fosslight_scanner-2.1.2}/PKG-INFO +1 -1
- fosslight_scanner-2.1.2/requirements.txt +11 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/setup.py +1 -1
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner/common.py +4 -2
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner/fosslight_scanner.py +14 -11
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner.egg-info/PKG-INFO +1 -1
- fosslight_scanner-2.1.2/src/fosslight_scanner.egg-info/requires.txt +11 -0
- fosslight_scanner-2.1.0/requirements.txt +0 -11
- fosslight_scanner-2.1.0/src/fosslight_scanner.egg-info/requires.txt +0 -11
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/LICENSE +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/MANIFEST.in +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/README.md +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/setup.cfg +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner/__init__.py +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner/_get_input.py +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner/_help.py +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner/_parse_setting.py +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner/_run_compare.py +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner/cli.py +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner/resources/bom_compare.html +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner.egg-info/SOURCES.txt +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner.egg-info/dependency_links.txt +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner.egg-info/entry_points.txt +0 -0
- {fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner.egg-info/top_level.txt +0 -0
|
@@ -15,7 +15,7 @@ with open('requirements.txt', 'r', 'utf-8') as f:
|
|
|
15
15
|
if __name__ == "__main__":
|
|
16
16
|
setup(
|
|
17
17
|
name='fosslight_scanner',
|
|
18
|
-
version='2.1.
|
|
18
|
+
version='2.1.2',
|
|
19
19
|
package_dir={"": "src"},
|
|
20
20
|
packages=find_packages(where='src'),
|
|
21
21
|
description='FOSSLight Scanner',
|
|
@@ -118,6 +118,9 @@ def create_scancodejson(all_scan_item_origin, ui_mode_report, src_path=""):
|
|
|
118
118
|
all_scan_item = copy.deepcopy(all_scan_item_origin)
|
|
119
119
|
if FOSSLIGHT_DEPENDENCY in all_scan_item.file_items:
|
|
120
120
|
del all_scan_item.file_items[FOSSLIGHT_DEPENDENCY]
|
|
121
|
+
first_sheet = FOSSLIGHT_SOURCE
|
|
122
|
+
if all_scan_item.file_items:
|
|
123
|
+
first_sheet = next(iter(all_scan_item.file_items))
|
|
121
124
|
if src_path:
|
|
122
125
|
fileitems_without_oss = []
|
|
123
126
|
for root, _, files in os.walk(src_path):
|
|
@@ -127,7 +130,6 @@ def create_scancodejson(all_scan_item_origin, ui_mode_report, src_path=""):
|
|
|
127
130
|
included = False
|
|
128
131
|
item_path = os.path.join(root, file)
|
|
129
132
|
item_path = item_path.replace(parent + os.path.sep, '', 1)
|
|
130
|
-
|
|
131
133
|
for file_items in all_scan_item.file_items.values():
|
|
132
134
|
for file_item in file_items:
|
|
133
135
|
if file_item.source_name_or_path:
|
|
@@ -138,7 +140,7 @@ def create_scancodejson(all_scan_item_origin, ui_mode_report, src_path=""):
|
|
|
138
140
|
fi_without_oss.source_name_or_path = item_path
|
|
139
141
|
fileitems_without_oss.append(fi_without_oss)
|
|
140
142
|
if len(fileitems_without_oss) > 0:
|
|
141
|
-
all_scan_item.file_items[
|
|
143
|
+
all_scan_item.file_items[first_sheet].extend(fileitems_without_oss)
|
|
142
144
|
if root_dir:
|
|
143
145
|
for file_items in all_scan_item.file_items.values():
|
|
144
146
|
for fi in file_items:
|
{fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner/fosslight_scanner.py
RENAMED
|
@@ -148,12 +148,15 @@ def run_scanner(src_path, dep_arguments, output_path, keep_raw_data=False,
|
|
|
148
148
|
for i, output_extension in enumerate(output_extensions):
|
|
149
149
|
if output_files[i] is None or output_files[i] == "":
|
|
150
150
|
if formats:
|
|
151
|
-
if formats[i].startswith('spdx'):
|
|
152
|
-
if platform.system()
|
|
153
|
-
|
|
154
|
-
else:
|
|
155
|
-
logger.warning('spdx format is not supported on Windows. Please remove spdx from format.')
|
|
151
|
+
if formats[i].startswith('spdx') or formats[i].startswith('cyclonedx'):
|
|
152
|
+
if platform.system() == 'Windows':
|
|
153
|
+
logger.warning(f'{formats[i]} is not supported on Windows. Please remove {formats[i]} from format.')
|
|
156
154
|
to_remove.append(i)
|
|
155
|
+
else:
|
|
156
|
+
if formats[i].startswith('spdx'):
|
|
157
|
+
output_files[i] = f"fosslight_spdx_all_{_start_time}"
|
|
158
|
+
elif formats[i].startswith('cyclonedx'):
|
|
159
|
+
output_files[i] = f'fosslight_cyclonedx_all_{_start_time}'
|
|
157
160
|
else:
|
|
158
161
|
if output_extension == _json_ext:
|
|
159
162
|
output_files[i] = f"fosslight_opossum_all_{_start_time}"
|
|
@@ -386,7 +389,7 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format
|
|
|
386
389
|
before_comp_f = path_arg[0]
|
|
387
390
|
after_comp_f = path_arg[1]
|
|
388
391
|
else:
|
|
389
|
-
logger.error("Enter two FOSSLight report file with 'p' option.")
|
|
392
|
+
logger.error("(compare mode) Enter two FOSSLight report file with 'p' option.")
|
|
390
393
|
return False
|
|
391
394
|
else:
|
|
392
395
|
CUSTOMIZED_FORMAT = {}
|
|
@@ -405,7 +408,7 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format
|
|
|
405
408
|
extract_folder = src_path
|
|
406
409
|
break
|
|
407
410
|
else:
|
|
408
|
-
logger.warning(f"Cannot analyze with multiple path: {path_arg}")
|
|
411
|
+
logger.warning(f"(-p option) Cannot analyze with multiple path: {path_arg}")
|
|
409
412
|
|
|
410
413
|
success, msg, output_path, output_files, output_extensions, formats = check_output_formats_v2(output_file_or_dir, file_format,
|
|
411
414
|
CUSTOMIZED_FORMAT)
|
|
@@ -420,13 +423,13 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format
|
|
|
420
423
|
try:
|
|
421
424
|
if "compare" in mode_list:
|
|
422
425
|
if before_comp_f == '' or after_comp_f == '':
|
|
423
|
-
logger.error("before and after files are necessary.")
|
|
426
|
+
logger.error("(compare mode) before and after files are necessary.")
|
|
424
427
|
return False
|
|
425
428
|
if not os.path.exists(os.path.join(_executed_path, before_comp_f)):
|
|
426
|
-
logger.error("Cannot find before FOSSLight report file (1st param with -y option).")
|
|
429
|
+
logger.error("(compare mode) Cannot find before FOSSLight report file (1st param with -y option).")
|
|
427
430
|
return False
|
|
428
431
|
if not os.path.exists(os.path.join(_executed_path, after_comp_f)):
|
|
429
|
-
logger.error("Cannot find after FOSSLight report file (2nd param with -y option).")
|
|
432
|
+
logger.error("(compare mode) Cannot find after FOSSLight report file (2nd param with -y option).")
|
|
430
433
|
return False
|
|
431
434
|
ret, final_excel_dir, result_log = init(output_path)
|
|
432
435
|
|
|
@@ -482,7 +485,7 @@ def run_main(mode_list, path_arg, dep_arguments, output_file_or_dir, file_format
|
|
|
482
485
|
if extract_folder:
|
|
483
486
|
shutil.rmtree(extract_folder)
|
|
484
487
|
else:
|
|
485
|
-
logger.error("No mode has been selected for analysis.")
|
|
488
|
+
logger.error("(mode) No mode has been selected for analysis.")
|
|
486
489
|
try:
|
|
487
490
|
if not keep_raw_data:
|
|
488
491
|
logger.debug(f"Remove temporary files: {_output_dir}")
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner/resources/bom_compare.html
RENAMED
|
File without changes
|
{fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{fosslight_scanner-2.1.0 → fosslight_scanner-2.1.2}/src/fosslight_scanner.egg-info/top_level.txt
RENAMED
|
File without changes
|