A user is trying to install package A, which depends on B, which depends on C.
C has a platform restriction. So you are saying the user should look at the entire dependency tree of package A, and B, to figure out that C won’t run before trying to install A?
Does not sound like a reasonable expectation.
On writing up a proposal… what format of proposal would make sense?
I downloaded the pypicache and looked at the platform entries:
So those values should be ignored, or not a constraint, for at least 83827 or 97% of the
packages in pypi.
For the remaining 3%, it is indeed quite variable… we have still more ignore type settings:
- plat=‘Posix; MacOS X; Windows’ 243
- plat=‘OS Independent’ 121
- plat=‘Platform Independent’ 33
- plat=‘ALL’ 38
- plat=‘Any’ 178
- plat=‘Operating System :: OS Independent’ 6
- plat=‘All platforms’ 5
So for another 624 packages it should still be ignored.
The rest is all a huge mess of around 200 different entries, which lots of them occurring once.
I understand the reticence. The starting point isn’t good.
There are wacky ones like:
plat=‘Probably any platform that uses floating point that kind of resembles IEEE 754.\r\n Tested on Linux.’ 1
plat=‘Tested on Ubuntu 22.04’ 1
So I get that the source information is free form and unspecified, but is that not something that can be improved?
I guess one would have to start with saying what should be in the platform package metadata field. Either structuring it a bit more, or asking
for additional fields. perhaps print a warning for the first few years "freeform platform entries deprecated: please follow some specification
After a few years could then start enforcing/using the platform info.
Is this the right place to ask about the definition of platform, and what should go there?
I looked here: Core metadata specifications - Python Packaging User Guide
But I’m not even sure if that is the same information as what is in pypi, and it seems
like one can have many platform entries which the pypi cache entries do not have.