mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-15 19:31:54 +08:00
Support MySQL Connector/6.1 on Windows
Merge remote-tracking branch 'mysqldb/mysql-connector-6.1'
This commit is contained in:
4
_mysql.c
4
_mysql.c
@ -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"
|
||||
|
@ -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']),
|
||||
|
2
site.cfg
2
site.cfg
@ -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
|
||||
|
Reference in New Issue
Block a user