fosslight-dependency 4.1.26__py3-none-any.whl → 4.1.28__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/Nuget.py +11 -30
- fosslight_dependency/run_dependency_scanner.py +7 -1
- {fosslight_dependency-4.1.26.dist-info → fosslight_dependency-4.1.28.dist-info}/METADATA +2 -2
- {fosslight_dependency-4.1.26.dist-info → fosslight_dependency-4.1.28.dist-info}/RECORD +11 -11
- {fosslight_dependency-4.1.26.dist-info → fosslight_dependency-4.1.28.dist-info}/WHEEL +0 -0
- {fosslight_dependency-4.1.26.dist-info → fosslight_dependency-4.1.28.dist-info}/entry_points.txt +0 -0
- {fosslight_dependency-4.1.26.dist-info → fosslight_dependency-4.1.28.dist-info}/licenses/LICENSE +0 -0
- {fosslight_dependency-4.1.26.dist-info → fosslight_dependency-4.1.28.dist-info}/licenses/LICENSES/Apache-2.0.txt +0 -0
- {fosslight_dependency-4.1.26.dist-info → fosslight_dependency-4.1.28.dist-info}/licenses/LICENSES/LicenseRef-3rd_party_licenses.txt +0 -0
- {fosslight_dependency-4.1.26.dist-info → fosslight_dependency-4.1.28.dist-info}/licenses/LICENSES/MIT.txt +0 -0
- {fosslight_dependency-4.1.26.dist-info → fosslight_dependency-4.1.28.dist-info}/top_level.txt +0 -0
|
@@ -48,25 +48,9 @@ class Nuget(PackageManager):
|
|
|
48
48
|
logger.info(f"Found {self.directory_packages_props}. Using NuGet CPM flow.")
|
|
49
49
|
self.packageReference = True
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
parts = rel_root.split(os.sep) if rel_root != os.curdir else []
|
|
55
|
-
if any(p.lower() in self._exclude_dirs for p in parts):
|
|
56
|
-
continue
|
|
57
|
-
assets_candidate = os.path.join(root, 'obj', 'project.assets.json')
|
|
58
|
-
if os.path.isfile(assets_candidate):
|
|
59
|
-
has_any_assets = True
|
|
60
|
-
break
|
|
61
|
-
|
|
62
|
-
if not has_any_assets:
|
|
63
|
-
logger.info("No project.assets.json found. Running 'dotnet restore'...")
|
|
64
|
-
restore_targets = self._find_restore_targets()
|
|
65
|
-
if not restore_targets:
|
|
66
|
-
logger.warning("No .sln or .csproj files found to restore.")
|
|
67
|
-
return False
|
|
68
|
-
|
|
69
|
-
success = False
|
|
51
|
+
restore_targets = self._find_restore_targets()
|
|
52
|
+
if restore_targets:
|
|
53
|
+
logger.info("Found .sln or .csproj files. Running 'dotnet restore'...")
|
|
70
54
|
for target_path, target_file in restore_targets:
|
|
71
55
|
logger.info(f"Restoring: {os.path.relpath(target_file, self.input_dir)}")
|
|
72
56
|
try:
|
|
@@ -78,22 +62,19 @@ class Nuget(PackageManager):
|
|
|
78
62
|
timeout=300
|
|
79
63
|
)
|
|
80
64
|
if result.returncode == 0:
|
|
81
|
-
|
|
65
|
+
logger.info(f"Successfully restored {os.path.relpath(target_file, self.input_dir)}")
|
|
82
66
|
else:
|
|
83
67
|
logger.warning(f"'dotnet restore' failed for {target_file} with return code {result.returncode}")
|
|
84
68
|
if result.stderr:
|
|
85
69
|
logger.warning(result.stderr)
|
|
86
70
|
except FileNotFoundError:
|
|
87
71
|
logger.error("'dotnet' command not found. Please install .NET SDK.")
|
|
88
|
-
return False
|
|
89
72
|
except subprocess.TimeoutExpired:
|
|
90
73
|
logger.warning(f"'dotnet restore' timed out for {target_file}.")
|
|
91
74
|
except Exception as e:
|
|
92
75
|
logger.warning(f"Failed to run 'dotnet restore' for {target_file}: {e}")
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
logger.warning("All 'dotnet restore' attempts failed.")
|
|
96
|
-
return False
|
|
76
|
+
else:
|
|
77
|
+
logger.warning("No .sln or .csproj files found to restore.")
|
|
97
78
|
|
|
98
79
|
self.project_dirs = []
|
|
99
80
|
found_projects = False
|
|
@@ -377,11 +358,11 @@ class Nuget(PackageManager):
|
|
|
377
358
|
elif f.endswith('.csproj'):
|
|
378
359
|
csproj_files.append((depth, root, os.path.join(root, f)))
|
|
379
360
|
|
|
361
|
+
result = []
|
|
380
362
|
if sln_files:
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
return [(d, f) for depth, d, f in sln_files if depth == min_depth]
|
|
363
|
+
result.extend([(d, f) for _, d, f in sln_files])
|
|
364
|
+
|
|
384
365
|
if csproj_files:
|
|
385
|
-
|
|
366
|
+
result.extend([(d, f) for _, d, f in csproj_files])
|
|
386
367
|
|
|
387
|
-
return
|
|
368
|
+
return result
|
|
@@ -20,6 +20,7 @@ from fosslight_dependency._analyze_dependency import analyze_dependency
|
|
|
20
20
|
from fosslight_util.output_format import check_output_formats_v2, write_output_file
|
|
21
21
|
from fosslight_util.oss_item import ScannerItem
|
|
22
22
|
from fosslight_dependency._graph_convertor import GraphConvertor
|
|
23
|
+
from fosslight_util.exclude import get_excluded_paths
|
|
23
24
|
|
|
24
25
|
# Package Name
|
|
25
26
|
_PKG_NAME = "fosslight_dependency"
|
|
@@ -244,7 +245,6 @@ def run_dependency_scanner(package_manager='', input_dir='', output_dir_file='',
|
|
|
244
245
|
else:
|
|
245
246
|
input_dir = os.getcwd()
|
|
246
247
|
os.chdir(input_dir)
|
|
247
|
-
scan_item.set_cover_pathinfo(input_dir, path_to_exclude)
|
|
248
248
|
|
|
249
249
|
autodetect = True
|
|
250
250
|
found_package_manager = {}
|
|
@@ -268,6 +268,12 @@ def run_dependency_scanner(package_manager='', input_dir='', output_dir_file='',
|
|
|
268
268
|
manifest_file_name = []
|
|
269
269
|
|
|
270
270
|
try:
|
|
271
|
+
excluded_path_with_default_exclusion, excluded_path_without_dot, _, _ = (
|
|
272
|
+
get_excluded_paths(input_dir, path_to_exclude, ''))
|
|
273
|
+
logger.debug(f"Skipped paths: {excluded_path_with_default_exclusion}")
|
|
274
|
+
scan_item.set_cover_pathinfo(input_dir, excluded_path_without_dot)
|
|
275
|
+
abs_path_to_exclude = [os.path.abspath(os.path.join(input_dir, path))
|
|
276
|
+
for path in excluded_path_with_default_exclusion]
|
|
271
277
|
ret, found_package_manager, input_dir, suggested_files = find_package_manager(input_dir,
|
|
272
278
|
abs_path_to_exclude,
|
|
273
279
|
manifest_file_name,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fosslight_dependency
|
|
3
|
-
Version: 4.1.
|
|
3
|
+
Version: 4.1.28
|
|
4
4
|
Summary: FOSSLight Dependency Scanner
|
|
5
5
|
Home-page: https://github.com/fosslight/fosslight_dependency_scanner
|
|
6
6
|
Download-URL: https://github.com/fosslight/fosslight_dependency_scanner
|
|
@@ -23,7 +23,7 @@ Requires-Dist: lxml
|
|
|
23
23
|
Requires-Dist: virtualenv
|
|
24
24
|
Requires-Dist: pyyaml
|
|
25
25
|
Requires-Dist: lastversion
|
|
26
|
-
Requires-Dist: fosslight_util>=2.1.
|
|
26
|
+
Requires-Dist: fosslight_util>=2.1.34
|
|
27
27
|
Requires-Dist: PyGithub
|
|
28
28
|
Requires-Dist: requirements-parser
|
|
29
29
|
Requires-Dist: defusedxml
|
|
@@ -5,7 +5,7 @@ fosslight_dependency/_help.py,sha256=1ER9CDiORhMdX1FYedPHcp2TRyvICPFGM1wxOOJ4PNE
|
|
|
5
5
|
fosslight_dependency/_package_manager.py,sha256=-hEOG44AnBoSKjMM-WQAbZIXhD8kHc-EwkOl1aLu-CA,15824
|
|
6
6
|
fosslight_dependency/constant.py,sha256=zaLjZsk4r5Gv6puCbV_Crt9pWrX_FEYzgEh0UQVIE4g,1291
|
|
7
7
|
fosslight_dependency/dependency_item.py,sha256=wNLWcsNycf3HQ5Pib2WrMeo2dn0eHCRg20NLcL95Qew,3345
|
|
8
|
-
fosslight_dependency/run_dependency_scanner.py,sha256=
|
|
8
|
+
fosslight_dependency/run_dependency_scanner.py,sha256=VTY9KLHhfNjcHUNepxNBmcUOr0_GHzNsqBsjJf7-QWw,23188
|
|
9
9
|
fosslight_dependency/LICENSES/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
10
10
|
fosslight_dependency/LICENSES/LicenseRef-3rd_party_licenses.txt,sha256=EcsFt7aE1rp3OXAdJgmXayfOZdpRdBMcmRnyoqWMCsw,95687
|
|
11
11
|
fosslight_dependency/package_manager/Android.py,sha256=SgQyVxEYvAcCN3EgP9p4QOQZpLIGDahXRm8ntgoCM3c,3666
|
|
@@ -17,7 +17,7 @@ fosslight_dependency/package_manager/Gradle.py,sha256=zTMvospDpfabl2DRk1jW316lW9
|
|
|
17
17
|
fosslight_dependency/package_manager/Helm.py,sha256=ucx2Y0tWX37UHIzIGaRyTe7uQ2vlu2nUuO09hOMq9ZU,4223
|
|
18
18
|
fosslight_dependency/package_manager/Maven.py,sha256=F1KQxR_LjSxl7ZgRS_W1TbuDpRERLoAVGLIUWOpjLmk,11046
|
|
19
19
|
fosslight_dependency/package_manager/Npm.py,sha256=6DSsRnk8tj8NUTjG4qFfybi9x-GW1I3FRGYbNn9IJpk,12300
|
|
20
|
-
fosslight_dependency/package_manager/Nuget.py,sha256=
|
|
20
|
+
fosslight_dependency/package_manager/Nuget.py,sha256=Q_pDGxsNOboVcA6KCEt2rAdFvTB46Z5sOvY4pKwNiHo,17290
|
|
21
21
|
fosslight_dependency/package_manager/Pnpm.py,sha256=LDKooFGQHui_Q5U7XqSJ8KcCPiLVndXf5oGKTJExh5w,7056
|
|
22
22
|
fosslight_dependency/package_manager/Pub.py,sha256=g4jqA19vf3jBdlmPLVZiIYMAQHNn3Y2I-_oq3vtpfv0,10372
|
|
23
23
|
fosslight_dependency/package_manager/Pypi.py,sha256=Ae-mFl9jSgc1XrUdzAuKGuZA4nduSsWaC-u6VVjFNtg,17187
|
|
@@ -25,12 +25,12 @@ fosslight_dependency/package_manager/Swift.py,sha256=8fdbdAXTNlp2NDoSqQXm48JGAg9
|
|
|
25
25
|
fosslight_dependency/package_manager/Unity.py,sha256=n1006GZ6Qrk8wAdO6wla1Q-JD7Evin7REVj-HDeTARc,5142
|
|
26
26
|
fosslight_dependency/package_manager/Yarn.py,sha256=ZSi7_O5tMmS80Z58YOZxvai84_KyDpP8plo0x80YtVc,10069
|
|
27
27
|
fosslight_dependency/package_manager/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
28
|
-
fosslight_dependency-4.1.
|
|
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.
|
|
28
|
+
fosslight_dependency-4.1.28.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
29
|
+
fosslight_dependency-4.1.28.dist-info/licenses/LICENSES/Apache-2.0.txt,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
30
|
+
fosslight_dependency-4.1.28.dist-info/licenses/LICENSES/LicenseRef-3rd_party_licenses.txt,sha256=EcsFt7aE1rp3OXAdJgmXayfOZdpRdBMcmRnyoqWMCsw,95687
|
|
31
|
+
fosslight_dependency-4.1.28.dist-info/licenses/LICENSES/MIT.txt,sha256=9cx4CbArgByWvkoEZNqpzbpJgA9TUe2D62rMocQpgfs,1082
|
|
32
|
+
fosslight_dependency-4.1.28.dist-info/METADATA,sha256=zyuppSQD8EgIN4J4IIWptlzq3rKFoyB0dcc2aZqmEd4,5555
|
|
33
|
+
fosslight_dependency-4.1.28.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
|
|
34
|
+
fosslight_dependency-4.1.28.dist-info/entry_points.txt,sha256=AeU-9Bl8al8Sa-XvhitGHdT3ZTPIrlhqADcp7s5OLF8,90
|
|
35
|
+
fosslight_dependency-4.1.28.dist-info/top_level.txt,sha256=Jc0V7VcVCH0TEM8ksb8dwroTYz4AmRaQnlr3FB71Hcs,21
|
|
36
|
+
fosslight_dependency-4.1.28.dist-info/RECORD,,
|
|
File without changes
|
{fosslight_dependency-4.1.26.dist-info → fosslight_dependency-4.1.28.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{fosslight_dependency-4.1.26.dist-info → fosslight_dependency-4.1.28.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fosslight_dependency-4.1.26.dist-info → fosslight_dependency-4.1.28.dist-info}/top_level.txt
RENAMED
|
File without changes
|