ANTsX / ANTsPy

A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
https://antspyx.readthedocs.io
Apache License 2.0
585 stars 161 forks source link

PyPI updating strategy #581

Open cookpa opened 3 months ago

cookpa commented 3 months ago

As discussed in #578 and #580

From @ncullen93:

looks like it's not the specific build size but just the total storage on pypi being over 10gb? So some old wheels need to be deleted? For what it's worth, I really don't think you need to build wheels for each python distribution specifically. I think it's more common to just build one wheel for "3.x" - see e.g., the pypi workflow I use elsewhere.

I don't have permission to delete old wheels. I am not attached to building every python, I don't know if there's stats on which versions get downloaded the most but will look into it.

What do others (devs and users) think about building fewer wheels?

cookpa commented 3 months ago

Via pypistats, over the last 180 days:

image image
cookpa commented 3 months ago

@stnava with the bug fixes at 0.5.1 it might be good to update PyPI. Python 3.8 will reach EOL in October 2024, so maybe that can be dropped.

Hopefully we will get more space to play with once the more efficient wheels are available via #591 .

ncullen93 commented 3 months ago

Yes the new wheels will be very small. It should be done within a few weeks.

stnava commented 3 months ago

ok - do you need pypi admin access @cookpa ?

cookpa commented 3 months ago

I think I have to be an owner to change things, yes. Whatever I am now lets me see the project under my project, but I can only view.

stnava commented 3 months ago

you got it

ncullen93 commented 1 month ago

@cookpa can we try to build wheels now and see the size? When I build locally using python -m build it's only 16mb but that seems too small.

cookpa commented 1 month ago

https://github.com/ANTsX/ANTsPy/actions/runs/9079311732

cookpa commented 1 month ago

Windows is failing because it explicitly calls setup.py, let's see if the others build

cookpa commented 1 month ago

@ncullen93 I got the Linux wheels to build, the artifacts are named funny but I can fix that. I installed the python 3.10 Linux wheel and it runs sucessfully! Amazing that it's only 17Mb

cookpa commented 1 month ago

On Intel Mac, there is a problem with cibuildwheel, it is getting into trouble with the MACOSX_DEPLOYMENT_TARGET. I think it might relate to this known issue with scikit-build

https://github.com/pypa/cibuildwheel/issues/952

Bumping the version of scikit-build and / or cibuildwheel might help

ncullen93 commented 1 month ago

Yeah I see the small size is also replicated on the ci build. Hoping it is for real. I will try to fix the wheel issues. edit: but I will wait to see if your PR fixes it

cookpa commented 1 month ago

I'm hoping that setting MACOSX_DEPLOYMENT_TARGET=10.14 in the environment will solve the problem. Somewhere it is setting a default of 10.9 and not respecting the pyproject.toml entry.

I may also have to downgrade cibuildwheel to 2.16.2 again, because the latest version appears to break the package delocalization on arm64.