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

PyPI: Drop using deprecated ez_setup.py in favor of get-pip.py. #716

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
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
12 changes: 3 additions & 9 deletions lib/dpl/provider/pypi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,15 @@ def skip_upload_docs?
(options.has_key?(:skip_upload_docs) && options[:skip_upload_docs])
end

def self.install_setuptools
shell 'wget https://bootstrap.pypa.io/ez_setup.py -O - | sudo python'
shell 'rm -f setuptools-*.zip'
def self.install_pip
shell 'wget https://bootstrap.pypa.io/get-pip.py -O - | sudo python'
end

def self.install_twine
shell("pip install twine", retry: true) if `which twine`.chop.empty?
end

def initialize(*args)
super(*args)
self.class.pip 'wheel' if pypi_distributions.to_s.include? 'bdist_wheel'
end

install_setuptools
install_pip
install_twine

def config
Expand Down
7 changes: 0 additions & 7 deletions spec/provider/pypi_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,6 @@
end
end

describe "#initialize" do
example "with :distributions option containing 'bdist_wheel'" do
expect(described_class).to receive(:pip).with("wheel")
described_class.new(DummyContext.new, :user => 'foo', :password => 'bar', :distributions => 'bdist_wheel sdist')
end
end

describe "#check_auth" do
example do
expect(provider).to receive(:log).with("Authenticated as foo")
Expand Down