-
Notifications
You must be signed in to change notification settings - Fork 283
Description
- We continue with CIBW_ARCHS as we are now; "auto" is the default, and auto (could) include universal2 for macOS, rather like it already includes 32bit for 64bit on the other OSs. I think most users will find this ideal for enabling or playing with the new architectures, since they are using things like
cp36*
now in build and that doesn't have to change unless they want to split based on it, see the final comments. macOS 11 considers "universal2" to be auto. - We add a
CIBW_MIN_PYTHON
flag, with the usual variants (and maybe command line flag? Don't know what the policy is for that). If it is not set, we read the value from PEP 621's location if set (eventually), and for now use 2.7 (27?) if not set. For CIBW 2.0, we can change the default to 3.6 (36?), but users could get at least 2.7 back by manually specifying this. This is mostly so we can keep the defaults "nice", while also supporting the full range that we can support. From 2.0 on, we raise the default minimum to always match the official Python EOL. feat: support brace expansion in BUILD/SKIP #527 - (Optional) We upgrade to using the wcmatch library; this gives
{}
syntax, which I love using on the shell (partially because I'm a fish user and tab completion works correctly when using it, so it's perfect for moves and such).cp{27,35}*
seems like it should work. Ve can activate the BRACE and NEGATE flags; this is simpler than my example above (basically just BUILD + SKIP), and is already well documented so we don't have to try to teach people how to use it, we can just point at this. Eventually, if this works well, we could push users away from the SKIP flag. - (Optional) We could add a little javascript selection in the docs as shown above. I just think that's very handy and will be "flashy" :)
ARCH/MIN_PYTHON are about telling cibuildwheel what you are interested in supporting, and is something we can adjust over time to "ideal" defaults, unless a user overrides them, in which case they specifically want that thing. With SKIP, which is in this category sort of, user overrides blend CPython/PyPy, Python version, and OS-ARCH, so we can't control each default separately without the new variables. BUILD is more about telling it what "this" job is trying to build out of the total allowed set.
Further; I propose we split the unreleased "special" value for "arch" into three special values:
"native"
: The native architecture (always one value).
"auto"
: Produces the native architecture + 32bit on 64bit non-macOS systems, or + universal2 on macOS. Basically "everything you can run tests on". This would be default, just like auto for CIBW_PLATFORM. I think this was first proposed by @mayeut ?
"all"
: Every known architecture, 3 archs on macOS, 2 on Windows, and 5 on linux, currently. Could grow in the future.
This makes universal2 fit in nicely, and provides a simple way to recover classic behavior. If you want to run on macOS 11 but want the old behavior, just set CIBW_ARCHS_MACOS: native
. That would work nicely if you have separate runs on hypothetical Apple Silicon runners someday. You could also use native
if you use the architecture
setting on the setup-python action, which is currently non-trivial to implement (due to different spellings on Windows and Linux).
And "all" lets you put all the work on build selectors; users would have to be aware that the "all" set could grow in future versions if new manylinux archs were added.
Native example:
matrix:
- os: [windows-latest, ubuntu-latest]
- architecture: [x86, x64]
...
- uses: actions/setup-python@v2
with:
python-version: 3.8
architecture: ${{ matrix.architecture }}
# What to put here for CIBW to avoid two copies of 32bit wheels?
This is probably best worked on after #484 goes in.
Originally posted by @henryiii in #516 (comment)