File tree 2 files changed +11
-5
lines changed
2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -41,16 +41,12 @@ def get_config():
41
41
static = enabled (options , 'static' )
42
42
if enabled (options , 'embedded' ):
43
43
libs = mysql_config ("libmysqld-libs" )
44
- client = "mysqld"
45
44
elif enabled (options , 'threadsafe' ):
46
45
libs = mysql_config ("libs_r" )
47
- client = "mysqlclient_r"
48
46
if not libs :
49
47
libs = mysql_config ("libs" )
50
- client = "mysqlclient"
51
48
else :
52
49
libs = mysql_config ("libs" )
53
- client = "mysqlclient"
54
50
55
51
library_dirs = [dequote (i [2 :]) for i in libs if i .startswith ('-L' )]
56
52
libraries = [dequote (i [2 :]) for i in libs if i .startswith ('-l' )]
@@ -68,6 +64,16 @@ def get_config():
68
64
include_dirs = [dequote (i [2 :])
69
65
for i in mysql_config ('include' ) if i .startswith ('-I' )]
70
66
67
+
68
+ # properly handle mysql client libraries that are not called libmysqlclient
69
+ client = None
70
+ CLIENT_LIST = ['mysqlclient' , 'mysqlclient_r' , 'mysqld' ,
71
+ 'perconaserverclient' , 'perconaserverclient_r' ]
72
+ for c in CLIENT_LIST :
73
+ if c in libraries :
74
+ client = c
75
+ break
76
+
71
77
if static :
72
78
extra_objects .append (os .path .join (library_dirs [0 ], 'lib%s.a' % client ))
73
79
if client in libraries :
Original file line number Diff line number Diff line change 5
5
6
6
embedded = False
7
7
threadsafe = True
8
- static = False
8
+ static = True
9
9
10
10
# The path to mysql_config.
11
11
# Only use this if mysql_config is not on your PATH, or you have some weird
You can’t perform that action at this time.
0 commit comments