Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 63df97d

Browse filesBrowse files
committed
Support MySQL-Connector/C 6.1 for Windows.
1 parent d34fac6 commit 63df97d
Copy full SHA for 63df97d

File tree

Expand file treeCollapse file tree

3 files changed

+7
-8
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+7
-8
lines changed

‎_mysql.c

Copy file name to clipboardExpand all lines: _mysql.c
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,7 @@ PERFORMANCE OF THIS SOFTWARE.
3838
#endif
3939
#include "pymemcompat.h"
4040
#include "structmember.h"
41-
#if defined(MS_WINDOWS)
42-
#include <config-win.h>
43-
#else
4441
#include "my_config.h"
45-
#endif
4642
#include "mysql.h"
4743
#include "mysqld_error.h"
4844
#include "errmsg.h"

‎setup_windows.py

Copy file name to clipboardExpand all lines: setup_windows.py
+6-3Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
import os, sys
2+
from distutils.msvccompiler import get_build_version
3+
24

35
def get_config():
46
from setup_common import get_metadata_and_options, enabled, create_release_file
@@ -14,16 +16,17 @@ def get_config():
1416
else:
1517
client = "mysqlclient"
1618

17-
library_dirs = [ os.path.join(connector, r'lib\opt') ]
19+
vcversion = int(get_build_version())
20+
library_dirs = [ os.path.join(connector, r'lib\vs%d' % vcversion) ]
1821
libraries = [ 'kernel32', 'advapi32', 'wsock32', client ]
1922
include_dirs = [ os.path.join(connector, r'include') ]
2023
extra_compile_args = [ '/Zl' ]
21-
24+
2225
name = "MySQL-python"
2326
if enabled(options, 'embedded'):
2427
name = name + "-embedded"
2528
metadata['name'] = name
26-
29+
2730
define_macros = [
2831
('version_info', metadata['version_info']),
2932
('__version__', metadata['version']),

‎site.cfg

Copy file name to clipboardExpand all lines: site.cfg
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ static = False
1414

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.