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

Jim Fulton jim at zope.com
Mon Mar 5 22:43:39 CET 2012

On Mon, Mar 5, 2012 at 4:21 PM, "Martin v. Löwis" <martin at v.loewis.de> wrote:
>> 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).

distutils/2/packaging should be able to set this automatically.

If we do this, maybe the possible values should be yes, no, and don't know.

>> 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.

I don't think anyone has a motive to cheat, unless their goal
if to be branded a cheater. :)  After all, as you point out,
if they cheat, they'll be found out pretty quickly.


Jim Fulton

More information about the Distutils-SIG mailing list