Mercurial > p > mysql-python > mysqldb-2
view setup.py @ 54:6e31278d3433 MySQLdb
There's no good reason to delay imports when the module is (1) useless without
it or (2) you do the same late import more than once.
author | kylev |
---|---|
date | Mon, 23 Feb 2009 23:52:44 +0000 |
parents | c9c2c8bf1b8c |
children | e606fd52e866 |
line wrap: on
line source
#!/usr/bin/env python import os import sys from setuptools import setup, Extension 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 else: # assume windows from setup_windows import get_config metadata, options = get_config() metadata['ext_modules'] = [ Extension( sources = [ '_mysql.c', '_mysql_connections.c', '_mysql_results.c', '_mysql_fields.c', ], **options), ] metadata['long_description'] = metadata['long_description'].replace(r'\n', '') metadata['test_suite'] = 'nose.collector' setup(**metadata)