Support MySQL Connector/6.1 on Windows

Merge remote-tracking branch 'mysqldb/mysql-connector-6.1'
This commit is contained in:
INADA Naoki
2014-04-28 14:15:33 +09:00
3 changed files with 7 additions and 8 deletions

View File

@ -38,11 +38,7 @@ PERFORMANCE OF THIS SOFTWARE.
#endif
#include "pymemcompat.h"
#include "structmember.h"
#if defined(MS_WINDOWS)
#include <config-win.h>
#else
#include "my_config.h"
#endif
#include "mysql.h"
#include "mysqld_error.h"
#include "errmsg.h"

View File

@ -1,4 +1,6 @@
import os, sys
from distutils.msvccompiler import get_build_version
def get_config():
from setup_common import get_metadata_and_options, enabled, create_release_file
@ -14,16 +16,17 @@ def get_config():
else:
client = "mysqlclient"
library_dirs = [ os.path.join(connector, r'lib\opt') ]
vcversion = int(get_build_version())
library_dirs = [ os.path.join(connector, r'lib\vs%d' % vcversion) ]
libraries = [ 'kernel32', 'advapi32', 'wsock32', client ]
include_dirs = [ os.path.join(connector, r'include') ]
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']),

View File

@ -14,4 +14,4 @@ static = False
# http://stackoverflow.com/questions/1972259/mysql-python-install-problem-using-virtualenv-windows-pip
# Windows connector libs for MySQL. You need a 32-bit connector for your 32-bit Python build.
connector = C:\Program Files (x86)\MySQL\MySQL Connector C 6.0.2
connector = C:\Program Files (x86)\MySQL\MySQL Connector C 6.1