-
Notifications
You must be signed in to change notification settings - Fork 85
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
Add github workflow to build wheels #1291
Conversation
Thank you for this! I need to find time to look at it more closely. We occasionally use tags for things other than releases, so I think we're not going to want to do this automatically on every pushed tag, and I'd want to be a bit cautious anyway about automated uploads to PyPI. OTOH, I don't really want to be manually uploading wheels one-by-one after they're built. The ideal workflow would look something like:
But as a first step we can leave out the last part and depend on manual wheel uploads. |
@@ -0,0 +1,3 @@ | |||
[build-system] | |||
requires = ["setuptools>=40.8.0", "wheel", "cython"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is cython
needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May be needed for this dependency: https://github.com/RalfG/python-wheels-manylinux-build
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand this is necessary to play well with pep517.build
. I haven't look into great details if this is strickly necessary but when I looked at it I came to the conclusion that is the most simple and - it seems - the most future proof, even if it adds one more configuration file!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I understand the necessity of the pyproject.toml
, and for wheel
and a minimum version for setuptools
. It's specifically the cython
requirement that I'm questioning. I think we shouldn't need this.
You could define specific prefix or suffix in the tag to filter/ignore tags which trigger this workflow (I have tried it): on:
push:
# Sequence of patterns matched against refs/tags
tags:
- '*'
tags-ignore:
- '*/*'
- '*rc*'
- '*-*'
Not sure what will define the approval but this is running the test suite (or part of it) after installing the wheels this could be added to the workflow.
Indeed, all the wheels are in a single artifact zip file on github, so it is a matter of downloading this file, checking you are happy with these wheels and upload to pypi:
|
I think that I will leave this PR to you now, my motivation for it is to give a good working base so that you can fiddle with it, so please free to do what you want with it: push to this branch, make another PR, etc! |
Sounds good. If I can, I'll push further commits to your branch (at least partly to make sure that you end up with proper attribution in the GitHub history). Many thanks for making this PR - it's much appreciated and hugely helpful.
Agreed, though I can't make any promises about how soon we'll find time to push this through. |
Closes #357. Recently, I have been setting up building wheels for some package of the hyperspy framework using github CI and it works very well! In this PR, I have adapted the template to build wheels for traits.
Example of this github workflow running: https://github.com/ericpre/traits/actions/runs/247784316
Checklist
docs/source/traits_api_reference
)docs/source/traits_user_manual
)traits-stubs