Skip to content

Commit 3d77795

Browse files
committed
Set python_version and operating_system for python-inspector #284
Signed-off-by: Thomas Druez <[email protected]>
1 parent 6b069c3 commit 3d77795

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

scanpipe/pipes/resolve.py

+8
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020
# ScanCode.io is a free software code scanning tool from nexB Inc. and others.
2121
# Visit https://github.com/nexB/scancode.io for support and download.
2222

23+
import sys
24+
2325
from attributecode.model import About
2426
from packagedcode import APPLICATION_PACKAGE_DATAFILE_HANDLERS
2527
from packageurl import PackageURL
@@ -36,10 +38,16 @@ def resolve_pypi_packages(input_location):
3638
"""
3739
Resolve the PyPI packages from the `input_location` requirements file.
3840
"""
41+
python_version = f"{sys.version_info.major}{sys.version_info.minor}"
42+
operating_system = "linux"
43+
3944
inspector_output = resolver_api(
4045
requirement_files=[input_location],
46+
python_version=python_version,
47+
operating_system=operating_system,
4148
prefer_source=True,
4249
)
50+
4351
return inspector_output.packages
4452

4553

0 commit comments

Comments
 (0)