-
Notifications
You must be signed in to change notification settings - Fork 247
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
Ideas for improving the first-run experience #468
Comments
You should use From your log |
It requires a recent Python to run - it builds all Python versions (2.7, 3.5-3.9). You need to set |
Any remaining questions? Can we close? |
It's up to you, regarding closing or not. Personally I would have found it helpful if there was a minimal explanation on what The other problem I ran into was the directories defined by |
Linux wheels are built inside docker images. So it cannot use the same path as in GitHub worker.
It is a problem with your package structure which may cause multiple problems in the future (for example with tox). I suggest moving sources to The simple workaround may use |
This is a good idea, I'll have a think about it |
Maybe add some boxes with |
This looks pretty cool to me! :-) Curious: how's it made; how easy would it be to update when we change things? (Not a blocker, but something to consider.) I agree with @Czaki that adding some indication (dashed lines and annotations at the bottom, for example?) for the customization points would be nice! |
Definitely would like the |
@robbmcleod If you use pyproject.toml, the pip install setuptools numpy Then a) users building from the SDist don't get any benefit, and b) NumPy is not pinned, so the wheels will not be loadable from anything but the very latest version of NumPy (if they use the NumPy C api at all). While if you have a pyproject.toml like this: [build-system]
requires = [
"setuptools>=42",
"wheel",
"numpy==1.13.3; python_version<='3.6'",
"numpy==1.14.5; python_version=='3.7'",
"numpy==1.17.3; python_version=='3.8'",
"numpy==1.19.4; python_version>='3.9'",
] Now the build is completely reproducible, and works out-of-the-box even if someone can't get a wheel without magic pre-installs (which cannot be specified in a dependency file, like requirements.txt), and can be loaded from any version of NumPy after the minimum (1.13 in my example). (Taken from https://scikit-hep.org/developer/packaging#pep-517518-support-high-priority ). And as an added benefit, The before steps are only for non-python setup, which hopefully is kept to a minimum - you want the best possible chance that a build will happen if a wheel is not available, such as on Arch, ClearLinux, etc. |
@henryiii there are some packages that need to be installed earlier (like |
That's what pyproject.toml is for. If you are not the maintainer of a package you are building for, then that might be another valid reason for I would really like to get cmake, ninja, and scikit-build available on all platforms cibuildwheel can run on. But the Universal2 support needs to be done first, both for us and for cmake's python package. CC @jcfr |
Ahh, or, yes, if you have a broken package in your dependencies that is missing a pyproject.toml; but then it is still broken, even with BEFORE, because you can't force the correct environment "before" inside your own pyproject.toml environment, so you are still broken if you need it to build. (Running is fine). |
manylinux images contain really outdated cmake in repositories. |
That's why you use pyproject.toml, you don't have to depend on what's in the manylinux image. You get to control this. |
This is good advice, it would be great to cover this in the documentation, perhaps a note on the BEFORE_BUILD option? |
I'll have a think about how to include this. It might be hard to figure out where to draw the line on what to include, and also might require updating more often if we add too much detail. Maybe it could show just BEFORE_ALL, BEFORE_BUILD, and TEST_COMMAND? |
Another idea on this - we could reverse the order that we build in. Currently we build from oldest to newest, so the first thing you see are errors on the oldest Python still in circulation. Why not build 3.9 first? It's more important that it works on 3.9 than it works on 2.7... and if a user sees all of 3.x succeed and 2.7 fail, they might just SKIP 2.7 and move on with their life :) |
That feels wrong, but might actually not be a bad plan, yes :-) |
Reversing the order of the build seems fine to me, it's pretty arbitrary logically, and if the most common problem is forgetting 2.7, then maybe this is "nicer", though it would waste more CPU time, as you'd do most of the build before it falling on 2.7. |
After @joerick adds a diagram, I thin this can be closed? |
I had another go at this diagram- any thoughts on this? I'm thinking it could go in the setup page in docs, before we introduce the CI services. We often say to users 'try to get your package to build using pyproject.toml/setup.cfg/setup.py before invoking cibuildwheel' but we never really say that in the docs. So we could say stuff like 'make sure your build works locally using |
Nice work, @joerick! I think this will indeed help people a lot! A few comments and random thoughts crossing my mind, seeing this:
So, in general, I really like the overview this gives of the whole project! The main thing I'm lacking is that my eyes don't seem to know where to look first, somehow. Apart from all that, one important question: how was this made? Is this e.g. an SVG that could be changed with Inkscape, or something we could edit with another OS application? I don't think that's a major blocker to get this in (many more benefits to get this in!), but I'm just trying to think whether it would always be your duty to update this. |
Thanks for the feedback @YannickJadoul ! Yeah, I like the left-to-right version better, too. It's more natural to have time moving in that direction. Also, this new one is maybe a little too much info? I'll give it another shot, I think. |
I'm not too sure about that one. Especially with a bit more contrast and maybe when it's clickable, I don't think this is per se too much, but up to you! |
Ok, so here's what I'm thinking.... Option 1... the simple overview. Perhaps suitable for the README. Option 2... the detailed clickable version. Only really possible in the docs, due to the interactivity. Sorry about the multiple hover states shown above, but you get the gist - hovering/tapping an element shows the info, click/second tap will take you to the docs for that option. Probably built in HTML using CSS grid, which should be quite suited to this sort of thing. One possibility that I'm also considering is that option 1 is enough, and that option 2 wouldn't be worth the work to code it up... what do you think @YannickJadoul ? |
Using the minimal example (https://github.com/joerick/cibuildwheel/blob/master/examples/github-minimal.yml) for GitHub Actions the Ubuntu build fails as it appears to be grabbing the system Python 2.7 instead of the specified Python 3.7:
https://github.com/robbmcleod/cpufeature/runs/1461364117
I tried explicitly using
python3
instead but that fails on Windows. An I assumepip
is stillpip2
rather thanpip3
.I'm trying to learn how to use this tool so I can build the wheels for
numexpr
(which I maintain), as that's going to hold up the release ofpandas
among other things. So any guidance you can provide here would be greatly appreciated.The text was updated successfully, but these errors were encountered: