0
|
1 #!/usr/bin/env python
|
|
2
|
|
3 import os
|
|
4 import sys
|
|
5 from distutils.core import setup
|
|
6 from distutils.extension import Extension
|
|
7
|
|
8 if sys.version_info < (2, 3):
|
5
|
9 raise Error, "Python-2.3 or newer is required"
|
0
|
10
|
4
|
11 if os.name == "posix":
|
5
|
12 from setup_posix import get_config
|
4
|
13 else: # assume windows
|
5
|
14 from setup_windows import get_config
|
0
|
15
|
5
|
16 metadata, options = get_config()
|
6
|
17 metadata['ext_modules'] = [
|
|
18 Extension(
|
|
19 sources = [
|
|
20 '_mysql.c',
|
|
21 '_mysql_connections.c',
|
|
22 '_mysql_results.c',
|
|
23 ],
|
|
24 **options),
|
|
25 ]
|
0
|
26 setup(**metadata)
|