From cbc4d1e328fd0e578f038d57fbd6b9354dafa79e Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 13 Jul 2020 09:57:29 -0600 Subject: Install tools from .deb package --- config/software/asdf_python.rb | 44 +++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'config/software/asdf_python.rb') diff --git a/config/software/asdf_python.rb b/config/software/asdf_python.rb index 5a0e9c9..68cfd68 100644 --- a/config/software/asdf_python.rb +++ b/config/software/asdf_python.rb @@ -54,35 +54,35 @@ build do configure(*configure_command, env: env) make "-j #{workers}", env: env make "-j #{workers} install", env: env - command "ln -s #{install_dir}/embedded/bin #{install_dir}/bin" -end + command "ln -s #{install_dir}/embedded/bin #{install_dir}/bin", env: env -build do if version.start_with?('3.') - command "ln -s #{install_dir}/bin/python3 #{install_dir}/bin/python" - command "ln -s #{install_dir}/bin/pip3 #{install_dir}/bin/pip" + command "ln -s #{install_dir}/bin/python3 #{install_dir}/bin/python", env: env + command "ln -s #{install_dir}/bin/pip3 #{install_dir}/bin/pip", env: env end - if File.exist?("#{install_dir}/bin/pip") - command "#{install_dir}/bin/pip install --upgrade pip" + case version + when /^3\.3\./ + command "curl https://bootstrap.pypa.io/3.3/get-pip.py -o #{project_dir}/get-pip.py", env: env + command "#{install_dir}/bin/python #{project_dir}/get-pip.py \"pip==10.0.1\"", env: env + command "#{install_dir}/bin/pip install pipenv virtualenv", env: env + when /^3\.4\./ + command "#{install_dir}/bin/pip install pipenv==11.1.6 virtualenv", env: env + when /^2\.7\./ + command "curl https://bootstrap.pypa.io/2.6/get-pip.py -o #{project_dir}/get-pip.py", env: env + command "#{install_dir}/bin/python #{project_dir}/get-pip.py \"pip<20.0\"", env: env + command "#{install_dir}/bin/pip install pipenv virtualenv", env: env else - case version - when /^3\.2\./ - command "curl https://bootstrap.pypa.io/3.2/get-pip.py -o #{project_dir}/get-pip.py" - when /^3\.3\./ - command "curl https://bootstrap.pypa.io/3.3/get-pip.py -o #{project_dir}/get-pip.py" - when /^3\.4\./ - command "curl https://bootstrap.pypa.io/3.4/get-pip.py -o #{project_dir}/get-pip.py" - when /^2\.6\./ - command "curl https://bootstrap.pypa.io/2.6/get-pip.py -o #{project_dir}/get-pip.py" - else - command "curl https://bootstrap.pypa.io/get-pip.py -o #{project_dir}/get-pip.py" - end + command "#{install_dir}/bin/pip install pipenv virtualenv", env: env + end - command "#{install_dir}/bin/python #{project_dir}/get-pip.py \"pip<20.0\"" + if version == default_version + command "#{install_dir}/bin/pip install conan", env: env + command "#{install_dir}/bin/conan --version", env: env end - command "#{install_dir}/bin/pip install pipenv virtualenv" - command "#{install_dir}/bin/pip install conan" if version == default_version + command "#{install_dir}/bin/pip --version", env: env + command "#{install_dir}/bin/pipenv --version", env: env + command "#{install_dir}/bin/virtualenv --version", env: env end build do -- cgit v1.2.3