Skip to content

How to not build manylinux1 build? #600

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

Closed
ghost opened this issue Feb 17, 2021 · 12 comments
Closed

How to not build manylinux1 build? #600

ghost opened this issue Feb 17, 2021 · 12 comments

Comments

@ghost
Copy link

ghost commented Feb 17, 2021

If use these options:

    env:
      CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
      CIBW_MANYLINUX_I686_IMAGE: manylinux2014
      CIBW_ARCHS_LINUX: "auto aarch64"

cibuildwheel builds these wheels:

pyzstd-0.14.1-cp39-cp39-manylinux1_i686.whl
pyzstd-0.14.1-cp39-cp39-manylinux2014_aarch64.whl
pyzstd-0.14.1-cp39-cp39-manylinux2014_i686.whl
pyzstd-0.14.1-cp39-cp39-manylinux2014_x86_64.whl

I want to not build manylinux1 build, if add this line:

CIBW_SKIP: "*manylinux1_i686*"

Then manylinux2014_i686.whl build is not built as well:

pyzstd-0.14.1-cp39-cp39-manylinux2014_aarch64.whl
pyzstd-0.14.1-cp39-cp39-manylinux2014_x86_64.whl
@YannickJadoul
Copy link
Member

cibuildwheel is not really building those. It's building in the manylinux2014 environment/container, but after the build auditwheel decides that your wheel is actually not just manylinux2014-compatible, but even manylinux1-compatible (i.e., not using anything from glibc introduced between <insert manylinux1 glibc version here> and <insert manylinux2014 glibc version here>).

So you're not doing any more builds, but just getting the same wheel "for free", as it's manylinux1-compatible. If you don't need or want it, I'd just delete it afterwards. But I don't really see the point of that; your wheel is compatible with more versions, so you might just as well provide it?

I want to not build manylinux1 build, if add this line:

CIBW_SKIP: "*manylinux1_i686*"

This is incorrect, though. First of all, CIBW_BUILD and CIBW_SKIP only select the build identifiers, and there's just a single manylinux identifier (i.e., cp39-manylinux_i686; see https://cibuildwheel.readthedocs.io/en/stable/options/#build-skip). It's decided by e.g. CIBW_MANYLINUX_I686_IMAGE in which version of the manylinux container things are built.

Also, the *manylinux1_* build identifiers are deprecated, and a warning is normally printed? cp39-manylinux1_i686 used to be the build identifier when we only supported manylinux1, but has been replaced by cp39-manylinux_i686 when cibuildwheel started supporting manylinux2010 and manylinux2014.

@YannickJadoul
Copy link
Member

So you're not doing any more builds, but just getting the same wheel "for free", as it's manylinux1-compatible. If you don't need or want it, I'd just delete it afterwards. But I don't really see the point of that; your wheel is compatible with more versions, so you might just as well provide it?

This should also become clear if you look more closely at the build log, btw. You'll see that auditwheel takes 1 wheel as in put and reports producing 2 wheels as output.

@mayeut
Copy link
Member

mayeut commented Feb 17, 2021

xref pypa/auditwheel#281 that might be of interest here

@ghost
Copy link
Author

ghost commented Feb 17, 2021

Thank you very much for your explanation.

If you don't need or want it, I'd just delete it afterwards. But I don't really see the point of that; your wheel is compatible with more versions, so you might just as well provide it?

Maybe it's hard to find a machine that older than manylinux2014's requirement, the built module only supports Python 3.5+ (Released in Sep, 2015), and Python 3.5 no longer provides security release since Sep, 2020.

So for my case, only very few machines will use manylinux1 build. I plan to delete manylinux1 builds to save some PyPI disk space.

@henryiii
Copy link
Contributor

Keep in mind 99% of the time users get manylinux1 is because their pip is too old, not the OS. You need pip 19+ for manylinux2010, 19.3+ for manylinux2014, and 20.3+ for the new Glibc based manylinux_2_* names (which, however, will fix this problem in the future, I believe, as it supports all future versions too).

Pip 9, for example, is the default on Ubuntu 18.04.

Dropping manylinux1 is a good thing to do, it's going to be dropped (the image, not the auditwheel output) this summer due to extreme age.

@ghost
Copy link
Author

ghost commented Feb 17, 2021

xref pypa/auditwheel#281 that might be of interest here

It would be nice to have a more friendly option to PyPI, for example, if manylinux1 wheel is the same as manylinux2014 wheel, then only manylinux1 wheel will be generated, it will save some PyPI disk space.

@ghost
Copy link
Author

ghost commented Feb 17, 2021

Keep in mind 99% of the time users get manylinux1 is because their pip is too old, not the OS. You need pip 19+ for manylinux2010, 19.3+ for manylinux2014, and 20.3+ for the new Glibc based manylinux_2_* names (which, however, will fix this problem in the future, I believe, as it supports all future versions too).

Pip 9, for example, is the default on Ubuntu 18.04.

I see, thanks for your explanation.

@YannickJadoul
Copy link
Member

So for my case, only very few machines will use manylinux1 build. I plan to delete manylinux1 builds to save some PyPI disk space.

You could also just delete the manylinux2014 wheels. Again, the wheels should be the same (you can probably compare the binaries inside; they should be exactly the same!), and everytime a manylinux2014 image can be installed, manylinux1 would also work. So there's not advantage, I believe?

@ghost
Copy link
Author

ghost commented Feb 17, 2021

So for my case, only very few machines will use manylinux1 build. I plan to delete manylinux1 builds to save some PyPI disk space.

You could also just delete the manylinux2014 wheels. Again, the wheels should be the same (you can probably compare the binaries inside; they should be exactly the same!), and everytime a manylinux2014 image can be installed, manylinux1 would also work. So there's not advantage, I believe?

Please consider provide an option that can do it automatically.

@YannickJadoul
Copy link
Member

Again, it's not cibuildwheel, it's auditwheel doing this. We have discussed what to do with this in the past, and just following auditwheel doesn't seem like a bad option.

@ghost
Copy link
Author

ghost commented Feb 17, 2021

Ok, it seems auditwheel is adding an option in the xref.

Thanks for your replies, I guess this issue could be closed, regards.

@ghost ghost closed this as completed Feb 17, 2021
@YannickJadoul
Copy link
Member

Ok, it seems auditwheel is adding an option in the xref.

Once they do that that, we should check whether to pass that flag by default or not, I suppose.

This issue was closed.
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

3 participants