Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Upgrade pip during Python setup #198

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions rock/python.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,13 @@ def self.rewrite_pip_shims(python_executable, root_dir)
pip_path
end

def self.upgrade_pip(ws: Autoproj.workspace)
python_executable = ws.config.get("python_executable", nil)
unless python_executable.nil?
Open3.popen3("#{python_executable} -m pip install --upgrade pip setuptools wheel")
end
end

# Activate configuration for python in the autoproj configuration
# @return [String,String] python path and python version
def self.activate_python(ws: Autoproj.workspace,
Expand All @@ -244,6 +251,7 @@ def self.activate_python(ws: Autoproj.workspace,

rewrite_python_shims(bin, ws.root_dir)
rewrite_pip_shims(bin, ws.root_dir)
upgrade_pip(ws: ws)
[bin, version]
end

Expand Down