Skip to content

Commit

Permalink
Use sudo to install setuptools twine wheel
Browse files Browse the repository at this point in the history
  • Loading branch information
BanzaiMan committed Jan 26, 2018
1 parent af2c5c6 commit ba33017
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/dpl/provider/pypi.rb
Expand Up @@ -33,8 +33,8 @@ def skip_upload_docs?
end

def install_deploy_dependencies
unless context.shell "wget -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && " \
"pip install --upgrade setuptools twine wheel"
unless context.shell "wget -O - https://bootstrap.pypa.io/get-pip.py | sudo python - --no-setuptools --no-wheel && " \
"sudo pip install --upgrade setuptools twine wheel"
error "Couldn't install pip, setuptools, twine or wheel."
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/provider/pypi_spec.rb
Expand Up @@ -9,7 +9,7 @@
describe "#install_deploy_dependencies" do
example do
expect(provider.context).to receive(:shell).with(
"wget -O - https://bootstrap.pypa.io/get-pip.py | python - --no-setuptools --no-wheel && pip install --upgrade setuptools twine wheel"
"wget -O - https://bootstrap.pypa.io/get-pip.py | sudo python - --no-setuptools --no-wheel && sudo pip install --upgrade setuptools twine wheel"
).and_return(true)
provider.install_deploy_dependencies
end
Expand Down

0 comments on commit ba33017

Please sign in to comment.