A while ago, Tim Peters mentioned in a check-in message: "Change the version string from "2.2+" to "2.3a0". distutils peels off the first 3 characters of this string in several places, so for as long as they remain "2.2" it confuses the heck out of attempts to build 2.3 stuff using distutils." It's true; distutils does sys.version[:3] in a few places. The attached patch factors this out so it'll be easier to change. (There's also a Python development issue here, namely when the version number gets bumped in the CVS tree.)
Logged In: YES user_id=80475 Nice factoring. Would it be more bulletproof to use sys.version_info instead of sys.version[:3]? Perhaps, wrap it in try/except to catch versions before Py2.0.