mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-16 12:27:03 +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
|
#endif
|
||||||
#include "pymemcompat.h"
|
#include "pymemcompat.h"
|
||||||
#include "structmember.h"
|
#include "structmember.h"
|
||||||
#if defined(MS_WINDOWS)
|
|
||||||
#include <config-win.h>
|
|
||||||
#else
|
|
||||||
#include "my_config.h"
|
#include "my_config.h"
|
||||||
#endif
|
|
||||||
#include "mysql.h"
|
#include "mysql.h"
|
||||||
#include "mysqld_error.h"
|
#include "mysqld_error.h"
|
||||||
#include "errmsg.h"
|
#include "errmsg.h"
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
import os, sys
|
import os, sys
|
||||||
|
from distutils.msvccompiler import get_build_version
|
||||||
|
|
||||||
|
|
||||||
def get_config():
|
def get_config():
|
||||||
from setup_common import get_metadata_and_options, enabled, create_release_file
|
from setup_common import get_metadata_and_options, enabled, create_release_file
|
||||||
@ -14,7 +16,8 @@ def get_config():
|
|||||||
else:
|
else:
|
||||||
client = "mysqlclient"
|
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 ]
|
libraries = [ 'kernel32', 'advapi32', 'wsock32', client ]
|
||||||
include_dirs = [ os.path.join(connector, r'include') ]
|
include_dirs = [ os.path.join(connector, r'include') ]
|
||||||
extra_compile_args = [ '/Zl' ]
|
extra_compile_args = [ '/Zl' ]
|
||||||
|
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
|
# 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.
|
# 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