fosslight-source 2.2.4__tar.gz → 2.2.5__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.
Files changed (25) hide show
  1. {fosslight_source-2.2.4/src/fosslight_source.egg-info → fosslight_source-2.2.5}/PKG-INFO +2 -2
  2. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/requirements.txt +1 -1
  3. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/setup.py +1 -1
  4. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source/run_scanoss.py +12 -6
  5. {fosslight_source-2.2.4 → fosslight_source-2.2.5/src/fosslight_source.egg-info}/PKG-INFO +2 -2
  6. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source.egg-info/requires.txt +1 -1
  7. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/LICENSE +0 -0
  8. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/MANIFEST.in +0 -0
  9. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/README.md +0 -0
  10. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/setup.cfg +0 -0
  11. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source/__init__.py +0 -0
  12. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source/_help.py +0 -0
  13. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source/_license_matched.py +0 -0
  14. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source/_parsing_scancode_file_item.py +0 -0
  15. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source/_parsing_scanoss_file.py +0 -0
  16. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source/_scan_item.py +0 -0
  17. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source/cli.py +0 -0
  18. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source/run_manifest_extractor.py +0 -0
  19. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source/run_scancode.py +0 -0
  20. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source/run_spdx_extractor.py +0 -0
  21. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source.egg-info/SOURCES.txt +0 -0
  22. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source.egg-info/dependency_links.txt +0 -0
  23. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source.egg-info/entry_points.txt +0 -0
  24. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/src/fosslight_source.egg-info/top_level.txt +0 -0
  25. {fosslight_source-2.2.4 → fosslight_source-2.2.5}/tests/test_tox.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fosslight_source
3
- Version: 2.2.4
3
+ Version: 2.2.5
4
4
  Summary: FOSSLight Source Scanner
5
5
  Home-page: https://github.com/fosslight/fosslight_source_scanner
6
6
  Download-URL: https://github.com/fosslight/fosslight_source_scanner
@@ -15,7 +15,7 @@ Requires-Python: >=3.10, <3.13
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
17
  Requires-Dist: pyparsing
18
- Requires-Dist: scanoss>=1.18.0
18
+ Requires-Dist: scanoss>=1.19.0
19
19
  Requires-Dist: XlsxWriter
20
20
  Requires-Dist: fosslight_util>=2.1.37
21
21
  Requires-Dist: PyYAML
@@ -1,5 +1,5 @@
1
1
  pyparsing
2
- scanoss>=1.18.0
2
+ scanoss>=1.19.0
3
3
  XlsxWriter
4
4
  fosslight_util>=2.1.37
5
5
  PyYAML
@@ -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.4',
17
+ version='2.2.5',
18
18
  package_dir={"": "src"},
19
19
  packages=find_packages(where='src'),
20
20
  description='FOSSLight Source Scanner',
@@ -13,12 +13,14 @@ import fosslight_util.constant as constant
13
13
  from ._parsing_scanoss_file import parsing_scan_result # scanoss
14
14
  from ._parsing_scanoss_file import parsing_extra_info # scanoss
15
15
  from scanoss.scanner import Scanner, ScanType
16
+ from scanoss.scanoss_settings import ScanossSettings
16
17
  import io
17
18
  import contextlib
18
19
 
19
20
  logger = logging.getLogger(constant.LOGGER_NAME)
20
21
  warnings.filterwarnings("ignore", category=FutureWarning)
21
22
  _PKG_NAME = "fosslight_source"
23
+ SCANOSS_RESULT_FILE = "scanner_output.wfp"
22
24
  SCANOSS_OUTPUT_FILE = "scanoss_raw_result.json"
23
25
 
24
26
 
@@ -51,16 +53,19 @@ def run_scanoss_py(path_to_scan: str, output_path: str = "", format: list = [],
51
53
  return scanoss_file_list, api_limit_exceed
52
54
 
53
55
  output_json_file = os.path.join(output_path, SCANOSS_OUTPUT_FILE)
56
+ output_wfp_file = os.path.join(output_path, SCANOSS_RESULT_FILE)
54
57
  if os.path.exists(output_json_file):
55
58
  os.remove(output_json_file)
56
59
 
57
60
  try:
61
+ scanoss_settings = ScanossSettings()
58
62
  scanner = Scanner(
59
63
  ignore_cert_errors=True,
60
64
  skip_folders=list(path_to_exclude) if path_to_exclude else [],
61
65
  scan_output=output_json_file,
62
66
  scan_options=ScanType.SCAN_SNIPPETS.value,
63
- nb_threads=num_threads if num_threads > 0 else 10
67
+ nb_threads=num_threads if num_threads > 0 else 10,
68
+ scanoss_settings=scanoss_settings
64
69
  )
65
70
 
66
71
  output_buffer = io.StringIO()
@@ -80,14 +85,15 @@ def run_scanoss_py(path_to_scan: str, output_path: str = "", format: list = [],
80
85
  with open(output_json_file, "r") as st_json:
81
86
  st_python = json.load(st_json)
82
87
  scanoss_file_list = parsing_scan_result(st_python, excluded_files)
83
-
84
- if not write_json_file:
85
- if os.path.isfile(output_json_file):
86
- os.remove(output_json_file)
87
-
88
88
  except Exception as error:
89
89
  logger.debug(f"SCANOSS Parsing {path_to_scan}: {error}")
90
90
 
91
+ if not write_json_file:
92
+ if os.path.isfile(output_json_file):
93
+ os.remove(output_json_file)
94
+ if os.path.isfile(output_wfp_file):
95
+ os.remove(output_wfp_file)
96
+
91
97
  logger.info(f"|---Number of files detected with SCANOSS: {(len(scanoss_file_list))}")
92
98
 
93
99
  return scanoss_file_list, api_limit_exceed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fosslight_source
3
- Version: 2.2.4
3
+ Version: 2.2.5
4
4
  Summary: FOSSLight Source Scanner
5
5
  Home-page: https://github.com/fosslight/fosslight_source_scanner
6
6
  Download-URL: https://github.com/fosslight/fosslight_source_scanner
@@ -15,7 +15,7 @@ Requires-Python: >=3.10, <3.13
15
15
  Description-Content-Type: text/markdown
16
16
  License-File: LICENSE
17
17
  Requires-Dist: pyparsing
18
- Requires-Dist: scanoss>=1.18.0
18
+ Requires-Dist: scanoss>=1.19.0
19
19
  Requires-Dist: XlsxWriter
20
20
  Requires-Dist: fosslight_util>=2.1.37
21
21
  Requires-Dist: PyYAML
@@ -1,5 +1,5 @@
1
1
  pyparsing
2
- scanoss>=1.18.0
2
+ scanoss>=1.19.0
3
3
  XlsxWriter
4
4
  fosslight_util>=2.1.37
5
5
  PyYAML