Skip to content
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

Bump release #145

Closed
edgarcosta opened this issue Jun 17, 2024 · 13 comments
Closed

Bump release #145

edgarcosta opened this issue Jun 17, 2024 · 13 comments

Comments

@edgarcosta
Copy link
Member

Given #142 would it be possible to bump the release to the official wheels include acb_theta?

@oscarbenjamin
Copy link
Collaborator

I had been hoping that the next release would include gh-132.

@edgarcosta
Copy link
Member Author

I see. Is there a cost of having minor releases back to back?
I'm writing a Magma wrapper for acb_theta via python-flint and I would sincerely appreciate if I could point people to just dopip install python-flint instead of walking them through how to pip install via pip .

@oscarbenjamin
Copy link
Collaborator

A general cost is that there are upper limits on total file size for a project in PyPI:
https://github.com/pypi/warehouse/blob/eeb119f1bea381a6d5747efa7e8d9f47b341213d/warehouse/forklift/legacy.py#L76-L77
The limit is 10GB. Currently a release of python-flint is about 300MB. That means that python-flint can have 30 releases total before running out of space.

If we can find a way to make the wheels smaller then that helps a lot. The large size is mostly just the size of libflint.so.

@edgarcosta
Copy link
Member Author

edgarcosta commented Jun 18, 2024 via email

@oscarbenjamin
Copy link
Collaborator

could the .so be provided by a different package?

I don't think so. At least the tooling etc to make that work does not exist yet.

I just tried running strip on libflint.so (and gmp/mpfr) though and that would make the manylinux wheels go down from 40MB to 22MB.

I see now that the wheels also contain all of the .c files generated by cython as well as the .so, .pyx and .pxd files. I'm not sure what the purpose of including the .c files is. Unzipped they take as much space as the .so files but removing them only makes the zip go down to 19MB (I suppose they compress well).

Combining strip with removing the .c files would shrink the installed footprint on Linux from 146MB to 55MB and bring the wheels down from 40MB to 19MB.

We can probably drop wheels for Python 3.9 but soon we will need wheels for Python 3.13. Also Python 3.13 brings "free-threaded" Python which doubles the number of binaries that users might want:

https://peps.python.org/pep-0703/#distribution

@oscarbenjamin
Copy link
Collaborator

Actually I was testing above with a 0.6.0 wheel downloaded form PyPI but that was built by setuptools.

The wheels that are built now in CI with meson-python are already smaller. The manylinux wheels are 29MB rather than 40MB. They already don't include the .c, .pyx or .pxd files and only have the .so files.

The libflint.so that they bundle is still 79MB though and reduces to 12MB after running strip. Rezipping after stripping the libs brings the wheel down to 10MB.

@oscarbenjamin
Copy link
Collaborator

Does anyone know any reason not to run GNU strip on liblfint.so?

It looks like it would reduce the installed size from about 100MB to 20MB and the wheel size from 29MB to 10MB.

@isuruf
Copy link
Member

isuruf commented Jun 19, 2024

The reason for the big size is probably the --enable-debug=yes default.

@oscarbenjamin
Copy link
Collaborator

Thanks @isuruf, I'm trying that out in gh-148

Btw the next release will likely cause some problems for conda because python-flint now uses meson-python and also Flint itself has dropped support for MPIR. So far the setup.py for setuptools is still there in case that is needed to make it work.

@oscarbenjamin
Copy link
Collaborator

Using --disable-debug doesn't seem to have much effect on the Windows/MacOS wheels but makes the Linux wheels 3x smaller. Since the Linux wheels were the larger ones that brings the overall size of a release down to more like 100MB compared to 300MB for previous releases.

@edgarcosta
Copy link
Member Author

Would it be possible to have a "dev" version that gets overwritten?

@oscarbenjamin
Copy link
Collaborator

Would it be possible to have a "dev" version that gets overwritten?

I guess we could have an alpha release.

We need to make it easier to push a release to PyPI though. I'll take a look at automating it as I have done for other repos. It wasn't possible before because the MacOS ARM wheels were being produced in Cirrus CI but now all wheels are produced in Github Actions since gh-134.

Also gh-132 is quite close now.

@edgarcosta
Copy link
Member Author

I closed this, as you provided the alpha, and it works for my purposes. Thanks

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