diff options
author | Monty Taylor <mordred@inaugust.com> | 2013-06-23 18:18:20 -0400 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2013-06-23 18:18:20 -0400 |
commit | bd95bd9d9c915a7779e0409c4daf9cc740cff439 (patch) | |
tree | be3ac4429eb2fc7cb35d4d7f780627800a37ccab | |
parent | 0d1dd6fa894d50ce9bec0f059d60321930ad5277 (diff) | |
download | mysqldb1-bd95bd9d9c915a7779e0409c4daf9cc740cff439.tar.gz |
Replace raise Error with distutils exception.
Distutils has an exceptions heirarchy. Use it.
-rw-r--r-- | setup.py | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -3,17 +3,19 @@ import os import sys -from setuptools import setup, Extension +import distutils.errors +import setuptools if not hasattr(sys, "hexversion") or sys.hexversion < 0x02040000: - raise Error("Python 2.4 or newer is required") + raise distutils.errors.DistutilsError("Python 2.4 or newer is required") if os.name == "posix": from setup_posix import get_config -else: # assume windows +else: # assume windows from setup_windows import get_config metadata, options = get_config() -metadata['ext_modules'] = [Extension(sources=['_mysql.c'], **options)] +metadata['ext_modules'] = [ + setuptools.Extension(sources=['_mysql.c'], **options)] metadata['long_description'] = metadata['long_description'].replace(r'\n', '') -setup(**metadata) +setuptools.setup(**metadata) |