Menu

[947b1a]: / MySQLdb / setup_windows.py  Maximize  Restore  History

Download this file

71 lines (59 with data), 2.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<<<<<<< HEAD
def get_config():
import os, sys, _winreg
=======
import os, sys
def get_config():
>>>>>>> MySQLdb-1.2
from setup_common import get_metadata_and_options, enabled, create_release_file
metadata, options = get_metadata_and_options()
<<<<<<< HEAD
serverKey = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, options['registry_key'])
mysql_root, dummy = _winreg.QueryValueEx(serverKey,'Location')
extra_objects = []
static = enabled(options, 'static')
# XXX static doesn't actually do anything on Windows
=======
connector = options["connector"]
extra_objects = []
>>>>>>> MySQLdb-1.2
if enabled(options, 'embedded'):
client = "mysqld"
else:
client = "mysqlclient"
<<<<<<< HEAD
library_dirs = [ os.path.join(mysql_root, r'lib\opt') ]
libraries = [ 'kernel32', 'advapi32', 'wsock32', client ]
include_dirs = [ os.path.join(mysql_root, r'include') ]
=======
library_dirs = [ os.path.join(connector, r'lib\opt') ]
libraries = [ 'kernel32', 'advapi32', 'wsock32', client ]
include_dirs = [ os.path.join(connector, r'include') ]
>>>>>>> MySQLdb-1.2
extra_compile_args = [ '/Zl' ]
name = "MySQL-python"
if enabled(options, 'embedded'):
name = name + "-embedded"
metadata['name'] = name
define_macros = [
('version_info', metadata['version_info']),
('__version__', metadata['version']),
]
create_release_file(metadata)
del metadata['version_info']
ext_options = dict(
name = "_mysql",
library_dirs = library_dirs,
libraries = libraries,
extra_compile_args = extra_compile_args,
include_dirs = include_dirs,
extra_objects = extra_objects,
define_macros = define_macros,
)
return metadata, ext_options
if __name__ == "__main__":
<<<<<<< HEAD
print """You shouldn't be running this directly; it is used by setup.py."""
=======
sys.stderr.write("""You shouldn't be running this directly; it is used by setup.py.""")
>>>>>>> MySQLdb-1.2