Python packaging 

So... I'm thinking that it'd be good for pip to stop installing from source distributions by default. It's a large and disruptive change though, and I'm trying to figure out what that disruption will look like.

Thoughts?

Also, that's a fun content warning and boosts would be appreciated coz I don't have followers. :)

Python packaging 

@pradyunsg I like that the way it currently works is more forgiving to maintainers who may not have the time to set up a CI for building wheels and doing any changes that may be required by it.

For x86_64 you can nowadays generally expect wheel to be present, but in case of any other arch it's generally not as good.
macOS arm64 is new enough that there's probably still some packages that don't support it.
manylinux aarch64 is generally built using an emulation (not many free CI platforms that have aarch64) which is both slow and not necessarily identical to real hardware (psutil seems to have this problem).
manylinux armhf doesn't even exist and running Raspberry Pi OS with piwheels.org only works with the Python version distributed by the system.
Coverage of other architectures (ppc64le, s390x) and non-glibc (musllinux) in most packages on PyPI is mostly non-existent. I don't use them but I think it would be a shame to add another bump on the road for those users. Any new architecture that may become popular in the future will also suffer the same problem.

Follow

@pradyunsg Additionally, building from sdist allows you to specify a more detailed error message than the generic one you would get from a failure caused by either lack of binary wheels or pip refusing to install from sdist. I feel like I also have seen some cool examples of using setup.py for something that isn't actually building a package but I don't have any concrete examples for that so I might be making that up.

I will say that the safety aspect of disallowing sdist installation by default is tempting though. Won't help if I'll just have to tell users to use the flag (due to a dependency, not me directly) but still, it is a tempting picture. Personally I am most interested about the aspect of me making typos though - I have made typos in package names and forgot `-r` flag way too often... I would love to have pip ask me (probably with a timeout by default for back-compat reasons), prompts me for confirmation before installing the package.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.