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: Raise error when twine upload fails and use get-pip.py. #717

Merged
merged 3 commits into from
Jan 22, 2018
Merged

PyPI: Raise error when twine upload fails and use get-pip.py. #717

merged 3 commits into from
Jan 22, 2018

Conversation

jezdez
Copy link
Contributor

@jezdez jezdez commented Nov 20, 2017

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

@jezdez jezdez changed the title PyPI: Raise error when twine upload fails. Fix #190 and #567. PyPI: Raise error when twine upload fails. Nov 20, 2017
@jezdez
Copy link
Contributor Author

jezdez commented Nov 20, 2017

@BanzaiMan This would be splendid to have, I hope the way to catch a exit code of 1 is right.

@edmorley
Copy link

Hi! I'm presuming this would have helped with this?
https://travis-ci.org/aio-libs/aiohttp/jobs/329243597#L2262
(ref aio-libs/aiohttp#2342 (comment))

@webknjaz
Copy link
Contributor

@BanzaiMan could you please accept this PR?

@BanzaiMan
Copy link
Contributor

This introduces some spec failures.

@BanzaiMan
Copy link
Contributor

Also, see #716 (comment).

@jezdez jezdez changed the title PyPI: Raise error when twine upload fails. PyPI: Raise error when twine upload fails and use get-pip.py. Jan 19, 2018
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.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@jezdez
Copy link
Contributor Author

jezdez commented Jan 19, 2018

@BanzaiMan Ok, could you take a look at the changes? This includes #716 as well now.

@webknjaz
Copy link
Contributor

@jezdez this doc requires that you provide a link to a test build using your branch via edge option.

@jezdez
Copy link
Contributor Author

jezdez commented Jan 19, 2018

@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
Here's the release on PyPI: https://pypi.python.org/pypi/travis-ci-pypi-deploy-test/0.1

@jezdez
Copy link
Contributor Author

jezdez commented Jan 19, 2018

FWIW there was a transient error with the Heroku provider that got fixed by running the build for this PR again.

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.

.

Uses the install_deploy_dependencies provider method to install pip, setuptools, twine and wheel.
@webknjaz
Copy link
Contributor

@BanzaiMan this PR is now production-ready

@jezdez
Copy link
Contributor Author

jezdez commented Jan 22, 2018

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.

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants