Cibuildwheel: Ability to skip Linux builds depending on abi tag

Created on 19 Aug 2018  Â·  6Comments  Â·  Source: joerick/cibuildwheel

I'm working on leveraging cibuildwheel to build the wheels for afdko — (WIP branch). The tool kit currently only supports Python 2.7, but we've been working on modernizing it.

I'm really enjoying cibuildwheel as it greatly simplifies the process of building and testing our wheels, but I think I've hit a snag: I can't find a way to tell it to NOT build the -cp27m- Linux wheel. For Linux we're only interested in the -cp27mu- wheel.

The complete afdko's test suite takes several minutes to run, so we'd really like to reduce the total build & test time to the minimum.

Is it possible to skip Linux builds depending on their abi tag? Thank you.

enhancement

Most helpful comment

If we don't want to interfere with CIBW_SKIP (and yeah, backwards compatibility is rather important), a specific option might be a good, quick, and non-intrusive solution.

Maybe CIBW_CP27_ABI_LINUX, to keep the CPython tag there? I'm still kind of dreaming of adding PyPy there, some hypothetical day in the future (or at least figure out if that's easy/possible) :-)

Related to that: I'm more and more noticing that the CIBW_SKIP is most of the time very useful, but that in some use cases a 'positive' way of adding/selecting stuff (rather than skipping everything but a specific version) could be more intuitive. (Especially if at some point we would be able to add PyPy support?) So apologies if that's off topic, but maybe adding such an option could be relevant to this discussion/solution?

All 6 comments

Hi @miguelsousa. I think you are right, there is no way to skip the one of the two 2.7 builds, since they currently have the same identifier in the list of build configurations.

I don't know the reason for this, but I'm guessing original idea was to take the 'burden' of these two different configurations.
As a temporary hack, until we find a good solution, you could still fork the repo and remove the configuration you don't want?

@joerick Potentially, updating python-platform to python-abi-platform could be an idea? Personally, I only use python-* or *-platform patterns, which would still match.

@YannickJadoul thanks for the reply. I hope the enhancement gets implemented in a future version. In the meantime I can use a fork, no problem.

@miguelsousa Thank you. I would hope to resolve this issue as well and not keep a bunch of 'rogue forks' around, but it might take a bit longer to get this fixed in the right way (and make sure we don't break existing configurations, etc).

I can't quite remember the logic behind leaving the abi tag out of the CIBW_SKIP option....! Maybe I was thinking it was just one variant on one platform - and not wanting to clutter the other platforms with extra details they didn't need.

Luckily it's only Python 2.7 with this distinction because we don't support 2.6, 3.1, 3.2.

  • It's going to be hard to adapt CIBW_SKIP to this, unless we can figure out a way to have a word in there target ABI instead of python-platform...
  • Or we could add a little option CIBW_27_ABI_LINUX (cp27mu, cp27m or both with the default as both)

My preference is probably for the last one, though it's not particularly intuitive, because I'm guessing this is a bit of an edge case that won't be seen by many users.

If we don't want to interfere with CIBW_SKIP (and yeah, backwards compatibility is rather important), a specific option might be a good, quick, and non-intrusive solution.

Maybe CIBW_CP27_ABI_LINUX, to keep the CPython tag there? I'm still kind of dreaming of adding PyPy there, some hypothetical day in the future (or at least figure out if that's easy/possible) :-)

Related to that: I'm more and more noticing that the CIBW_SKIP is most of the time very useful, but that in some use cases a 'positive' way of adding/selecting stuff (rather than skipping everything but a specific version) could be more intuitive. (Especially if at some point we would be able to add PyPy support?) So apologies if that's off topic, but maybe adding such an option could be relevant to this discussion/solution?

I'm using a fork and py27 is on its way out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

msanders picture msanders  Â·  5Comments

Daggy1234 picture Daggy1234  Â·  7Comments

ax3l picture ax3l  Â·  11Comments

breznak picture breznak  Â·  10Comments

thedrow picture thedrow  Â·  9Comments