# HG changeset patch # User kylev # Date 1233908463 0 # Node ID 1c0ff5eb071bb735baa6de1d18eaa386d9c45d98 # Parent 597efa4e031144594514b47fe700446b8a6ae2cd Get rid of 2.6 deprecation warnings on Exception style, and cleanly detect the python version from sys.hexversion . https://sourceforge.net/tracker/index.php?func=detail&aid=2122496&group_id=22307&atid=374932 diff -r 597efa4e0311 -r 1c0ff5eb071b setup.py --- a/setup.py Fri Feb 06 04:31:38 2009 +0000 +++ b/setup.py Fri Feb 06 08:21:03 2009 +0000 @@ -5,8 +5,8 @@ import ez_setup; ez_setup.use_setuptools() from setuptools import setup, Extension -if sys.version_info < (2, 3): - raise Error, "Python-2.3 or newer is required" +if not hasattr(sys, "hexversion") or sys.hexversion < 0x02030000: + raise Error("Python 2.3 or newer is required") if os.name == "posix": from setup_posix import get_config