fosslight-source 2.2.11__tar.gz → 2.2.12__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_source-2.2.11/src/fosslight_source.egg-info → fosslight_source-2.2.12}/PKG-INFO +1 -1
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/setup.py +1 -1
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/run_scancode.py +54 -7
- {fosslight_source-2.2.11 → fosslight_source-2.2.12/src/fosslight_source.egg-info}/PKG-INFO +1 -1
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/LICENSE +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/MANIFEST.in +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/README.md +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/requirements.txt +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/setup.cfg +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/__init__.py +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/_help.py +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/_license_matched.py +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/_parsing_scancode_file_item.py +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/_parsing_scanoss_file.py +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/_scan_item.py +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/cli.py +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/run_manifest_extractor.py +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/run_scanoss.py +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/run_spdx_extractor.py +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source.egg-info/SOURCES.txt +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source.egg-info/dependency_links.txt +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source.egg-info/entry_points.txt +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source.egg-info/requires.txt +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source.egg-info/top_level.txt +0 -0
- {fosslight_source-2.2.11 → fosslight_source-2.2.12}/tests/test_tox.py +0 -0
|
@@ -14,7 +14,7 @@ with open('requirements.txt', 'r', 'utf-8') as f:
|
|
|
14
14
|
if __name__ == "__main__":
|
|
15
15
|
setup(
|
|
16
16
|
name='fosslight_source',
|
|
17
|
-
version='2.2.
|
|
17
|
+
version='2.2.12',
|
|
18
18
|
package_dir={"": "src"},
|
|
19
19
|
packages=find_packages(where='src'),
|
|
20
20
|
description='FOSSLight Source Scanner',
|
|
@@ -22,6 +22,39 @@ logger = logging.getLogger(constant.LOGGER_NAME)
|
|
|
22
22
|
warnings.filterwarnings("ignore", category=FutureWarning)
|
|
23
23
|
_PKG_NAME = "fosslight_source"
|
|
24
24
|
|
|
25
|
+
try:
|
|
26
|
+
from click.core import UNSET as _CLICK_UNSET # Click >= 8.3
|
|
27
|
+
_HAS_CLICK_UNSET = True
|
|
28
|
+
except ImportError: # pragma: no cover
|
|
29
|
+
_CLICK_UNSET = None
|
|
30
|
+
_HAS_CLICK_UNSET = False
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _apply_scancode_unset_workaround(kwargs: dict) -> None:
|
|
34
|
+
"""
|
|
35
|
+
Click 8.3+ uses UNSET for optional multi-value plugin defaults. Those values
|
|
36
|
+
are truthy, so plugins like --facet run with UNSET and crash (not iterable).
|
|
37
|
+
Replace UNSET defaults with () or None before cli.run_scan().
|
|
38
|
+
"""
|
|
39
|
+
try:
|
|
40
|
+
for opt in cli.plugin_options:
|
|
41
|
+
if opt.name in kwargs:
|
|
42
|
+
continue
|
|
43
|
+
default = getattr(opt, "default", None)
|
|
44
|
+
unset = (_HAS_CLICK_UNSET and default is _CLICK_UNSET) or (
|
|
45
|
+
getattr(default, "__class__", type(None)).__name__ == "Sentinel"
|
|
46
|
+
)
|
|
47
|
+
if not unset:
|
|
48
|
+
continue
|
|
49
|
+
if getattr(opt, "multiple", False):
|
|
50
|
+
kwargs[opt.name] = ()
|
|
51
|
+
elif getattr(opt, "is_flag", None):
|
|
52
|
+
kwargs[opt.name] = False
|
|
53
|
+
else:
|
|
54
|
+
kwargs[opt.name] = None
|
|
55
|
+
except Exception as ex: # pragma: no cover
|
|
56
|
+
logger.debug("scancode UNSET workaround skipped: %s", ex)
|
|
57
|
+
|
|
25
58
|
|
|
26
59
|
def run_scan(
|
|
27
60
|
path_to_scan: str, output_file_name: str = "",
|
|
@@ -128,13 +161,27 @@ def run_scan(
|
|
|
128
161
|
|
|
129
162
|
total_files_to_excluded = sorted(list(set(total_files_to_excluded)))
|
|
130
163
|
ignore_tuple = tuple(total_files_to_excluded)
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
164
|
+
|
|
165
|
+
kwargs = {
|
|
166
|
+
"max_depth": 100,
|
|
167
|
+
"strip_root": True,
|
|
168
|
+
"license": True,
|
|
169
|
+
"copyright": True,
|
|
170
|
+
"return_results": True,
|
|
171
|
+
"processes": num_cores,
|
|
172
|
+
"pretty_params": pretty_params,
|
|
173
|
+
"output_json_pp": output_json_file,
|
|
174
|
+
"only_findings": True,
|
|
175
|
+
"license_text": True,
|
|
176
|
+
"url": True,
|
|
177
|
+
"timeout": time_out,
|
|
178
|
+
"include": (),
|
|
179
|
+
"ignore": ignore_tuple
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
_apply_scancode_unset_workaround(kwargs)
|
|
183
|
+
|
|
184
|
+
rc, results = cli.run_scan(path_to_scan, **kwargs)
|
|
138
185
|
if not rc:
|
|
139
186
|
msg = "Source code analysis failed."
|
|
140
187
|
success = False
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/_license_matched.py
RENAMED
|
File without changes
|
|
File without changes
|
{fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/_parsing_scanoss_file.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/run_manifest_extractor.py
RENAMED
|
File without changes
|
|
File without changes
|
{fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source/run_spdx_extractor.py
RENAMED
|
File without changes
|
{fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source.egg-info/requires.txt
RENAMED
|
File without changes
|
{fosslight_source-2.2.11 → fosslight_source-2.2.12}/src/fosslight_source.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|