Kinda followup to this... :)
My project is Python 3-only and my question is basically how I tell distutils/distribute/whoever that this package is Python 3-only?
Kinda followup to this... :)
My project is Python 3-only and my question is basically how I tell distutils/distribute/whoever that this package is Python 3-only?
Not sure if there's some special setting, but this in the beginning of setup.py might help:
import sys
if sys.version_info.major < 3:
print("I'm only for 3, please upgrade")
sys.exit(1)
sys.version_info < (3,) (I believe that's primarily to make it easier to change to (3, 1) when you want to drop support for 3.0), but I don't think this is really confusing or less readable..major < 3, because that immediately assigns meaning to the number. This doesn't really matter in this instance, since it's pretty obvious anyway, though ;)
pip2.x will not see your app, or will refuse to install it, or just so that runningpython2.7 setup.py installwill give an error? For the latter, bereal's solution is perfect.pip2 differently, you can always ask for that info later; no need to learn all that now if you don't plan to use it.Programming Language :: Python :: 3instead of the defaultProgramming Language :: Pythonclassifier. Anyway, all this is really just to preventeasy_install,pip, or whatever future tool comes out of thedistribute2project from having to download your package before giving an error.