[Distutils] Limit package installation to a specific Python version

Lele Gaifax lele at metapensiero.it
Fri Jan 20 16:56:45 EST 2017

Hi all,

do installers like pip and conda consult trove classifiers, or more generally
is there a way to "mark" a package published on PyPI as installable only in a
Python 3 environment?

An user proposed[1] to change the classifiers of a package to get that result,
so I tried looking at pip and setuptools sources, but didn't find evidence of
that. I see both use python_requires[2] in their setup that seem closer to the
goal, but again, is that actually honored by pip and/or other installers?

Thanks for any hint,
ciao, lele.

[1] https://github.com/python-rapidjson/python-rapidjson/pull/47
[2] https://www.python.org/dev/peps/pep-0345/#requires-python
nickname: Lele Gaifax | Quando vivrò di quello che ho pensato ieri
real: Emanuele Gaifas | comincerò ad aver paura di chi mi copia.
lele at metapensiero.it  |                 -- Fortunato Depero, 1929.

More information about the Distutils-SIG mailing list