[Distutils] Fwd: Adding a "Pure Python" flag to PyPI

"Martin v. Löwis" martin at v.loewis.de
Mon Mar 5 22:21:32 CET 2012


> I can't see a way of reliably establishing whether a distribution is
> "pure Python", and yet distutils/packaging clearly has that
> information available when building. Would it be worthwhile adding a
> "pure Python" flag to the PyPI classifiers, which could be
> automatically populated by packaging? We'd still be reliant on people
> who manually maintain metadata getting it correct, but it would help
> in many cases (and in particular, in those cases where projects do
> regularly upload binary distributions).

I don't think it's worthwhile. It would take forever (literally decades)
for this to get into wide use, unless some tool enforces it (e.g. PyPI
refuses the upload if there is a C file in the source tarball, yet the
package is not marked pure C).

> Alternatively, if there is a way of reliably identifying those
> packages that can't be installed from source by someone without a
> compiler, I'd be interested to know.

Depends on how reliable you want it. Whatever mechanism someone can
propose, I can find a way to cheat that mechanism.

However, downloading the source distribution and inspecting it should
be fairly reliable.

Regards,
Martin


More information about the Distutils-SIG mailing list