summaryrefslogtreecommitdiff
path: root/lib/license/finder/ext/pip.rb
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-04-20 13:17:05 +0000
committermo khan <mo.khan@gmail.com>2020-04-20 13:17:05 +0000
commit0d268993b9416e7c9756cfc2298dba35ef913ed5 (patch)
tree3ac8be01834cd7f4d5e38c4065c9d60ee8c34318 /lib/license/finder/ext/pip.rb
parent222af4bf77171fb4b9fb33e6e42dcd32dbf19d54 (diff)
parent0d2701caaa74eeaa62c18b4f9fee157c56208c2b (diff)
Merge branch '211688-gradle' into 'master'v3.7.2
Use GRADLE_CLI_OPTS during `gradle downloadLicenses` task. See merge request gitlab-org/security-products/license-management!121
Diffstat (limited to 'lib/license/finder/ext/pip.rb')
-rw-r--r--lib/license/finder/ext/pip.rb14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/license/finder/ext/pip.rb b/lib/license/finder/ext/pip.rb
index 084816c..51e2039 100644
--- a/lib/license/finder/ext/pip.rb
+++ b/lib/license/finder/ext/pip.rb
@@ -55,19 +55,11 @@ module LicenseFinder
Dir.chdir(project_path) { yield }
end
- def pypi
- @pypi ||= Spandx::Python::PyPI.new(sources: [
- Spandx::Python::Source.new({
- 'name' => 'pypi',
- 'url' => python.pip_index_url,
- 'verify_ssl' => true
- })
- ])
- end
-
def legacy_results
+ sources = [Spandx::Python::Source.new({ 'name' => 'pypi', 'url' => python.pip_index_url, 'verify_ssl' => true })]
+ pypi = Spandx::Python::PyPI.new
pip_output.map do |name, version, _children, _location|
- spec = pypi.definition_for(name, version)
+ spec = pypi.definition_for(name, version, sources: sources)
Package.new(
name,
version,