summaryrefslogtreecommitdiff
path: root/lib/license/management/python.rb
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-05-27 14:59:20 +0000
committermo khan <mo.khan@gmail.com>2020-05-27 14:59:20 +0000
commit5b4aca6e3c936bca2657d1ad1a8f336838fda4bb (patch)
tree2a5ba8dfc9bdb61c58633373be122ae2f83df1e7 /lib/license/management/python.rb
parentbff873a938de126d2b79e799df325f3d5c31295b (diff)
parent80fa34dd2bd72af88efcb85844302d04450a0e1e (diff)
Merge branch '212919-conan-integration-tests' into 'master'v3.10.0
Scan conan projects See merge request gitlab-org/security-products/license-management!156
Diffstat (limited to 'lib/license/management/python.rb')
-rw-r--r--lib/license/management/python.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/license/management/python.rb b/lib/license/management/python.rb
index b8932f9..ccf53e9 100644
--- a/lib/license/management/python.rb
+++ b/lib/license/management/python.rb
@@ -24,7 +24,7 @@ module License
ENV.fetch('PIP_INDEX_URL', 'https://pypi.org/simple/')
end
- def pip_licenses(venv: '.venv')
+ def pip_licenses(venv: '.venv', detection_path:)
_stdout, _stderr, status = shell.sh([
". #{venv}/bin/activate &&",
:pip, :install,
@@ -41,10 +41,12 @@ module License
return [] unless status.success?
JSON.parse(IO.read('pip-licenses.json')).map do |dependency|
- ::LicenseFinder::Package.new(
+ ::LicenseFinder::Dependency.new(
+ 'Pip',
dependency['Name'],
dependency['Version'],
description: dependency['Description'],
+ detection_path: detection_path,
homepage: dependency['URL'],
spec_licenses: [dependency['License']]
)