diff options
| author | mo khan <mo.khan@gmail.com> | 2020-03-31 17:10:43 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-04-01 10:05:57 -0600 |
| commit | 43bcbbd04342faa497725c5b0be3c6d944d850da (patch) | |
| tree | a6cdec790c84c64b7cbf084bb0aea7efdbac2583 /lib | |
| parent | b7ba92d3fb70b3d029c4d7b34ed1178a5809762b (diff) | |
Create pipenv environment using full Python versionv3.4.0
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/license/finder/ext/pipenv.rb | 2 | ||||
| -rw-r--r-- | lib/license/management/python.rb | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/lib/license/finder/ext/pipenv.rb b/lib/license/finder/ext/pipenv.rb index 9736393..075ddd9 100644 --- a/lib/license/finder/ext/pipenv.rb +++ b/lib/license/finder/ext/pipenv.rb @@ -5,7 +5,7 @@ module LicenseFinder def prepare return unless pipfile? - shell.execute([:pipenv, '--python', python.major_version]) + shell.execute([:pipenv, '--python', python.version]) shell.execute([:pipenv, :run, :pipenv, :sync, '--pypi-mirror', python.pip_index_url]) end diff --git a/lib/license/management/python.rb b/lib/license/management/python.rb index 37771ba..8a1a81a 100644 --- a/lib/license/management/python.rb +++ b/lib/license/management/python.rb @@ -14,7 +14,10 @@ module License end def version - ENV.fetch('LM_PYTHON_VERSION', '3') + ENV.fetch('ASDF_PYTHON_VERSION') do + _stdout, stderr, status = shell.execute([:python, '--version']) + status.success? ? stderr.split(' ')[-1] : 3 + end end def pip_index_url |
