Skip to content

Commit f98631f

Browse files
committed
second
Signed-off-by: hkkim <[email protected]>
1 parent 0ebda19 commit f98631f

28 files changed

+44589
-4
lines changed
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
Metadata-Version: 2.1
2+
Name: fosslight_source
3+
Version: 2.0.0
4+
Summary: FOSSLight Source Scanner
5+
Home-page: https://github.com/fosslight/fosslight_source_scanner
6+
Download-URL: https://github.com/fosslight/fosslight_source_scanner
7+
Author: LG Electronics
8+
License: Apache-2.0
9+
Classifier: License :: OSI Approved :: Apache Software License
10+
Classifier: Programming Language :: Python :: 3
11+
Classifier: Programming Language :: Python :: 3.8
12+
Classifier: Programming Language :: Python :: 3.9
13+
Classifier: Programming Language :: Python :: 3.10
14+
Classifier: Programming Language :: Python :: 3.11
15+
Requires-Python: >=3.8
16+
Description-Content-Type: text/markdown
17+
License-File: LICENSE
18+
Requires-Dist: pyparsing
19+
Requires-Dist: scancode-toolkit==32.0.*,>=32.0.2
20+
Requires-Dist: scanoss
21+
Requires-Dist: XlsxWriter
22+
Requires-Dist: fosslight_util>=2.0.0
23+
Requires-Dist: PyYAML
24+
Requires-Dist: wheel>=0.38.1
25+
Requires-Dist: intbitset
26+
Requires-Dist: fosslight_binary>=5.0.0
27+
Requires-Dist: typecode-libmagic; sys_platform != "darwin"
28+
29+
<!--
30+
Copyright (c) 2021 LG Electronics
31+
SPDX-License-Identifier: Apache-2.0
32+
-->
33+
<p align='right'>
34+
<a href="https://fosslight.org/fosslight-guide/scanner/2_source.html">
35+
[Korean]
36+
</a>
37+
</p>
38+
39+
# FOSSLight Source Scanner
40+
41+
<img src="https://img.shields.io/pypi/l/fosslight_source" alt="FOSSLight Source Scanner is released under the Apache-2.0 License." /> <img src="https://img.shields.io/pypi/v/fosslight_source" alt="Current python package version." /> <img src="https://img.shields.io/pypi/pyversions/fosslight_source" /> [![REUSE status](https://api.reuse.software/badge/github.com/fosslight/fosslight_source_scanner)](https://api.reuse.software/info/github.com/fosslight/fosslight_source_scanner) [![Guide](http://img.shields.io/badge/-doc-blue?style=flat-square&logo=github&link=https://fosslight.org/fosslight-guide-en/scanner/2_source.html)](https://fosslight.org/fosslight-guide-en/scanner/2_source.html)
42+
</p>
43+
44+
```note
45+
Detect the license for the source code.
46+
Use Source Code Scanner and process the scanner results.
47+
```
48+
49+
**FOSSLight Source Scanner** uses source code scanners, [ScanCode][sc] and [SCANOSS][scanoss]. [ScanCode][sc] detects copyright and license phrases contained in the file and [SCANOSS][scanoss] searches OSS Name, OSS Version, download location, copyright and license information from [OSSKB][osskb]. Some files (ex- build script), binary files, directory and files in specific directories (ex-test) are excluded from the result. And removes words such as "-only" and "-old-style" from the license name to be printed. The output result is generated in spreadsheet format.
50+
51+
52+
[sc]: https://github.com/nexB/scancode-toolkit
53+
[scanoss]: https://github.com/scanoss/scanoss.py
54+
[osskb]: https://osskb.org/
55+
56+
57+
## 📖 User Guide
58+
59+
We describe the user guide in the FOSSLight guide page.
60+
Please see the [**User Guide**](https://fosslight.org/fosslight-guide-en/scanner/2_source.html) for more information on how to install and run it.
61+
62+
63+
## 👏 Contributing Guide
64+
65+
We always welcome your contributions.
66+
Please see the [CONTRIBUTING guide](https://fosslight.org/fosslight-guide-en/learn/1_contribution.html) for how to contribute.
67+
68+
69+
## 📄 License
70+
71+
FOSSLight Source Scanner is Apache-2.0, as found in the [LICENSE][l] file.
72+
73+
[l]: https://github.com/fosslight/fosslight_source_scanner/blob/main/LICENSE
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
LICENSE
2+
MANIFEST.in
3+
README.md
4+
requirements.txt
5+
setup.py
6+
src/fosslight_source/__init__.py
7+
src/fosslight_source/_help.py
8+
src/fosslight_source/_license_matched.py
9+
src/fosslight_source/_parsing_scancode_file_item.py
10+
src/fosslight_source/_parsing_scanoss_file.py
11+
src/fosslight_source/_scan_item.py
12+
src/fosslight_source/cli.py
13+
src/fosslight_source/run_scancode.py
14+
src/fosslight_source/run_scanoss.py
15+
src/fosslight_source/run_spdx_extractor.py
16+
src/fosslight_source.egg-info/PKG-INFO
17+
src/fosslight_source.egg-info/SOURCES.txt
18+
src/fosslight_source.egg-info/dependency_links.txt
19+
src/fosslight_source.egg-info/entry_points.txt
20+
src/fosslight_source.egg-info/requires.txt
21+
src/fosslight_source.egg-info/top_level.txt
22+
tests/test_tox.py
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[console_scripts]
2+
fosslight_source = fosslight_source.cli:main
3+
run_scancode = fosslight_source.run_scancode:main
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
pyparsing
2+
scancode-toolkit==32.0.*,>=32.0.2
3+
scanoss
4+
XlsxWriter
5+
fosslight_util>=2.0.0
6+
PyYAML
7+
wheel>=0.38.1
8+
intbitset
9+
fosslight_binary>=5.0.0
10+
11+
[:sys_platform != "darwin"]
12+
typecode-libmagic
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fosslight_source
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[ INFO] [FOSSLIGHT_SOURCE] OS: Darwin 23.6.0
2+
Output Directory: /Users/hkkim/Desktop/OSS/tox_to_pytest/fosslight_source_scanner/test_result_func_call/result
3+
Path to analyze: /Users/hkkim/Desktop/OSS/tox_to_pytest/fosslight_source_scanner/tests/test_files/test
4+
Python version: 3
5+
Scan Result: 'True'
6+
Tool Info: fosslight_source v2.0.0
7+
8+
[ DEBUG] [FOSSLIGHT_SOURCE] SCANOSS Parsing /Users/hkkim/Desktop/OSS/tox_to_pytest/fosslight_source_scanner/tests/test_files/test: 'Scanner' object has no attribute 'post_processor'
9+
[ INFO] [FOSSLIGHT_SOURCE] |---Number of files detected with SCANOSS: 0
10+
[WARNING] [] [Scan] Result: True
11+
[WARNING] [] [Scan] Result_msg: True
12+
[WARNING] [] []
13+
[WARNING] [] []
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
{
2+
"headers": [
3+
{
4+
"tool_name": "scancode-toolkit",
5+
"tool_version": "32.0.2",
6+
"options": {
7+
"path_to_scan": "/Users/hkkim/Desktop/OSS/tox_to_pytest/fosslight_source_scanner/tests/test_files/test",
8+
"path_to_exclude": [],
9+
"output_file": "test_result_func_call/result"
10+
},
11+
"notice": "Generated with ScanCode and provided on an \"AS IS\" BASIS, WITHOUT WARRANTIES\nOR CONDITIONS OF ANY KIND, either express or implied. No content created from\nScanCode should be considered or used as legal advice. Consult an Attorney\nfor any legal advice.\nScanCode is a free software code scanning tool from nexB Inc. and others.\nVisit https://github.com/nexB/scancode-toolkit/ for support and download.",
12+
"start_timestamp": "2024-09-27T140741.050986",
13+
"end_timestamp": "2024-09-27T140744.501601",
14+
"output_format_version": "3.0.0",
15+
"duration": 3.4506490230560303,
16+
"message": null,
17+
"errors": [],
18+
"warnings": [],
19+
"extra_data": {
20+
"system_environment": {
21+
"operating_system": "mac",
22+
"cpu_architecture": "64",
23+
"platform": "macOS-14.6.1-arm64-arm-64bit",
24+
"platform_version": "Darwin Kernel Version 23.6.0: Mon Jul 29 21:16:46 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8112",
25+
"python_version": "3.12.2 (v3.12.2:6abddd9f6a, Feb 6 2024, 17:02:06) [Clang 13.0.0 (clang-1300.0.29.30)]"
26+
},
27+
"spdx_license_list_version": "3.20",
28+
"files_count": 2
29+
}
30+
}
31+
],
32+
"license_detections": [
33+
{
34+
"identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a",
35+
"license_expression": "mit",
36+
"detection_count": 1
37+
},
38+
{
39+
"identifier": "apache_2_0-a1bff6dc-3cc3-fd04-f94d-88e18ba8fe76",
40+
"license_expression": "apache-2.0",
41+
"detection_count": 1
42+
}
43+
],
44+
"files": [
45+
{
46+
"path": "MIT_TEST.txt",
47+
"type": "file",
48+
"detected_license_expression": "mit",
49+
"detected_license_expression_spdx": "MIT",
50+
"license_detections": [
51+
{
52+
"license_expression": "mit",
53+
"matches": [
54+
{
55+
"score": 100.0,
56+
"start_line": 1,
57+
"end_line": 5,
58+
"matched_length": 161,
59+
"match_coverage": 100.0,
60+
"matcher": "1-hash",
61+
"license_expression": "mit",
62+
"rule_identifier": "mit.LICENSE",
63+
"rule_relevance": 100,
64+
"rule_url": "https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/mit.LICENSE",
65+
"matched_text": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,\n subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE."
66+
}
67+
],
68+
"identifier": "mit-cacd5c0c-204a-85c2-affc-e4c125b2492a"
69+
}
70+
],
71+
"license_clues": [],
72+
"percentage_of_license_text": 100.0,
73+
"copyrights": [],
74+
"holders": [],
75+
"authors": [],
76+
"urls": [],
77+
"scan_errors": []
78+
},
79+
{
80+
"path": "temp.cpp",
81+
"type": "file",
82+
"detected_license_expression": "apache-2.0",
83+
"detected_license_expression_spdx": "Apache-2.0",
84+
"license_detections": [
85+
{
86+
"license_expression": "apache-2.0",
87+
"matches": [
88+
{
89+
"score": 100.0,
90+
"start_line": 3,
91+
"end_line": 3,
92+
"matched_length": 6,
93+
"match_coverage": 100.0,
94+
"matcher": "1-spdx-id",
95+
"license_expression": "apache-2.0",
96+
"rule_identifier": "spdx-license-identifier-apache-2.0-8b7d7ba520c6ab392deaea36b8b1f018b637027e",
97+
"rule_relevance": 100,
98+
"rule_url": null,
99+
"matched_text": " * SPDX-License-Identifier: Apache-2.0"
100+
}
101+
],
102+
"identifier": "apache_2_0-a1bff6dc-3cc3-fd04-f94d-88e18ba8fe76"
103+
}
104+
],
105+
"license_clues": [],
106+
"percentage_of_license_text": 18.75,
107+
"copyrights": [
108+
{
109+
"copyright": "Copyright 2022 LG Electronics Inc. SPDX-License-Identifier Apache-2.0 DownloadLocation https://github.com/browserify/acorn-node",
110+
"start_line": 2,
111+
"end_line": 4
112+
}
113+
],
114+
"holders": [
115+
{
116+
"holder": "LG Electronics Inc. SPDX-License-Identifier Apache-2.0 DownloadLocation",
117+
"start_line": 2,
118+
"end_line": 4
119+
}
120+
],
121+
"authors": [],
122+
"urls": [
123+
{
124+
"url": "https://github.com/browserify/acorn-node",
125+
"start_line": 4,
126+
"end_line": 4
127+
}
128+
],
129+
"scan_errors": []
130+
}
131+
]
132+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
file=0e199bbda022959e303bc874c484d5ac,270,temp.cpp
2+
4=15c946a7
3+
6=87ea1232
4+
10=8c12fccc,f775252d
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[ INFO] Output Directory: /Users/hkkim/Desktop/OSS/tox_to_pytest/fosslight_source_scanner/test_scan
2+
Scan Result: 'True'
3+
4+
[ DEBUG] SCANOSS Parsing tests/test_files: 'Scanner' object has no attribute 'post_processor'
5+
[ INFO] |---Number of files detected with SCANOSS: 0
6+
[ INFO] [FOSSLIGHT_SOURCE] No correction with yaml: Cannot find sbom-info.yaml in tests/test_files.
7+
[ INFO] [FOSSLIGHT_SOURCE] Output file: /Users/hkkim/Desktop/OSS/tox_to_pytest/fosslight_source_scanner/test_scan/fosslight_report_src_240927_1407.xlsx
8+
[ INFO] [FOSSLIGHT_SOURCE] Total number of files
9+
[ INFO] [FOSSLIGHT_SOURCE] removed files: 13
10+
[ INFO] [FOSSLIGHT_SOURCE] 0
11+
[ INFO] [FOSSLIGHT_SOURCE] Scan Result: 'True'
12+

0 commit comments

Comments
 (0)