comparison setup.py @ 23:1c0ff5eb071b MySQLdb

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
author kylev
date Fri, 06 Feb 2009 08:21:03 +0000
parents d55bfb1a4701
children 2f4672764d39
comparison
equal deleted inserted replaced
22:597efa4e0311 23:1c0ff5eb071b
3 import os 3 import os
4 import sys 4 import sys
5 import ez_setup; ez_setup.use_setuptools() 5 import ez_setup; ez_setup.use_setuptools()
6 from setuptools import setup, Extension 6 from setuptools import setup, Extension
7 7
8 if sys.version_info < (2, 3): 8 if not hasattr(sys, "hexversion") or sys.hexversion < 0x02030000:
9 raise Error, "Python-2.3 or newer is required" 9 raise Error("Python 2.3 or newer is required")
10 10
11 if os.name == "posix": 11 if os.name == "posix":
12 from setup_posix import get_config 12 from setup_posix import get_config
13 else: # assume windows 13 else: # assume windows
14 from setup_windows import get_config 14 from setup_windows import get_config