-
Notifications
You must be signed in to change notification settings - Fork 367
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: Raise error when twine upload fails and use get-pip.py. #717
Conversation
@BanzaiMan This would be splendid to have, I hope the way to catch a exit code of 1 is right. |
Hi! I'm presuming this would have helped with this? |
@BanzaiMan could you please accept this PR? |
This introduces some spec failures. |
Also, see #716 (comment). |
lib/dpl/provider/pypi.rb
Outdated
unless context.shell 'wget https://bootstrap.pypa.io/get-pip.py -O - | sudo python' | ||
error "Couldn't install pip and setuptools." | ||
end | ||
context.shell("pip install twine", retry: true) if `which twine`.chop.empty? |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@BanzaiMan Ok, could you take a look at the changes? This includes #716 as well now. |
@webknjaz Thanks for the pointer, I didn't know about that keyword. I created the project travis-ci-pypi-deploy-test and set it up to auto-deploy on tags using the pypi-error branch in my dpl fork. Here's the successful build and deploy: https://travis-ci.org/jezdez/travis-ci-pypi-deploy-test/builds/330851628 |
FWIW there was a transient error with the Heroku provider that got fixed by running the build for this PR again. |
lib/dpl/provider/pypi.rb
Outdated
super(*args) | ||
self.class.pip 'wheel' if pypi_distributions.to_s.include? 'bdist_wheel' | ||
def install_deploy_dependencies | ||
unless context.shell "wget https://bootstrap.pypa.io/get-pip.py && " \ |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@BanzaiMan this PR is now production-ready |
Huzzah! 🙌 |
self.class.pip 'wheel' if pypi_distributions.to_s.include? 'bdist_wheel' | ||
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" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Fix #190, #567 and #603.
This also removes installing wheel conditionally since get-pip.py will
install wheel automatically (see https://pip.pypa.io/en/stable/installing/).
More info about the deprecation of ez_setup.py: pypa/setuptools#581