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

Would it be possible to deploy to pypi automatically from travis? #4

Closed
alexlenail opened this issue Apr 11, 2017 · 6 comments
Closed

Comments

@alexlenail
Copy link

Check out these travis docs. I'm probably wrong, but would it be possible to upload these wheels directly, in the same step?

@joerick
Copy link
Contributor

joerick commented Apr 11, 2017

Yes that's possible, just make sure that you get your deploy rules set up right so you're not always trying to overwrite each version! I think PyPI won't overwrite existing wheels for each release.

@joerick joerick closed this as completed Apr 11, 2017
@alexlenail
Copy link
Author

alexlenail commented Apr 15, 2017

I've added some deploy commands to my travis file, and my build succeeds, but it doesn't look like the wheels are being uploaded to pypi. What do you think? My guess is it has to do with the deployer being confused at already finding wheels in wheelhouse/ but not sure... @joerick

@alexlenail
Copy link
Author

In the macOS build, something different happened, which made me think it might be the version number. I've upped the version number and I'm trying again.

@alexlenail
Copy link
Author

alexlenail commented Apr 15, 2017

@joerick After updating the version number to 1.0.3 it doesn't seem like anything was uploaded to pypi. Would you mind working with me on this to establish definitive instructions for future users?

@joerick
Copy link
Contributor

joerick commented Apr 15, 2017

Hey! I think you might need the skip_cleanup option on your deploy.

I've not added this to the docs because in the past I've found it really hard to get this kind of auto-deploy mechanism to work satisfactorily - for example, normally you'd set it to only deploy on a tag but say the build fails, then you've got to tag/release a whole new version just to fix the build.

Also, you have to upload the sdist separately, but the wheel uploads will lag so some users will get sdist just because the wheel is still building.

Sorry to be negative! I'm sure there's a good way to do it but I'm not ready to recommend anything yet! So for now my recommended method is a temporary storage location and a manual deploy.

Do let me know if this works well for you though, it might become a case study for others to use. 👍

@alexlenail
Copy link
Author

alexlenail commented Apr 16, 2017

Thanks as always for getting back to me @joerick. Apologies for being such a noob, but I have a few questions about this:

  1. You say in the "Manual Deploy" instructions:

# Go and download your wheel files from wherever you put them.

but I'm not sure in my current config where I'm even putting my wheels. My mental model for travis is that it's spinning up a VM, doing all these tasks, then throwing away all the data and reporting back whether it succeeded. It's putting all the wheels in wheelhouse/ but I'm not sure how to access that directory, and I'm assuming it's removed once the travis job completes. Is that mental model incorrect? How would I go about downloading my wheels from wheelhouse/?

  1. Wheelhouse uploader, which you recommend as the semi-automatic method, seems to mainly be built to upload wheels to clouds like s3, and then perhaps download them later to be uploaded to pypi. But it seems like s3 buckets are required to make it work. Am I reading that wrong -- Is there a way to use wheelhouse uploader to upload wheels from the travis VM?

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

No branches or pull requests

2 participants