view setup.py @ 56:89b07ce2a788 MySQLdb

python 2.4 is our minimum version now
author kylev
date Fri, 27 Feb 2009 19:46:55 +0000
parents e606fd52e866
children 8506ded95181
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 < 0x02040000:
    raise Error("Python 2.4 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=['src/mysqlmod.c',
                       'src/connections.c',
                       'src/results.c',
                       'src/fields.c',
                       ],
              **options),
    ]
metadata['long_description'] = metadata['long_description'].replace(r'\n', '')
metadata['test_suite'] = 'nose.collector'
setup(**metadata)