@@ -128,7 +128,6 @@ class BaseCommand(Command):
128
128
build_base = None
129
129
log = LOGGER
130
130
vendor_folder = os .path .join ("lib" , "mysql" , "vendor" )
131
- private_folder = os .path .join ("lib" , "mysql" , "private" )
132
131
133
132
_mysql_info = {}
134
133
_build_mysql_lib_dir = None
@@ -168,8 +167,7 @@ def finalize_options(self):
168
167
cmd_build_ext .extra_compile_args = self .extra_compile_args
169
168
cmd_build_ext .extra_link_args = self .extra_link_args
170
169
171
- if os .name == "posix" :
172
- self ._copy_vendor_libraries ()
170
+ self ._copy_vendor_libraries ()
173
171
174
172
def remove_temp (self ):
175
173
"""Remove temporary build files."""
@@ -179,9 +177,6 @@ def remove_temp(self):
179
177
vendor_folder = os .path .join (os .getcwd (), self .vendor_folder )
180
178
if os .path .exists (vendor_folder ):
181
179
remove_tree (vendor_folder )
182
- private_folder = os .path .join (os .getcwd (), self .private_folder )
183
- if os .path .exists (private_folder ):
184
- remove_tree (private_folder )
185
180
elif os .name == "nt" :
186
181
if ARCH == "64-bit" :
187
182
libraries = ["libmysql.dll" , "libssl-1_1-x64.dll" ,
@@ -208,11 +203,12 @@ def _get_openssl_libs(self):
208
203
def _copy_vendor_libraries (self ):
209
204
vendor_libs = []
210
205
211
- # Bundle OpenSSL libs
212
- if self .with_openssl_lib_dir :
213
- libssl , libcrypto = self ._get_openssl_libs ()
214
- vendor_libs .append (
215
- (self .with_openssl_lib_dir , [libssl , libcrypto ]))
206
+ if os .name == "posix" :
207
+ # Bundle OpenSSL libs
208
+ if self .with_openssl_lib_dir :
209
+ libssl , libcrypto = self ._get_openssl_libs ()
210
+ vendor_libs .append (
211
+ (self .with_openssl_lib_dir , [libssl , libcrypto ]))
216
212
217
213
# Plugins
218
214
bundle_plugin_libs = False
@@ -222,7 +218,9 @@ def _copy_vendor_libraries(self):
222
218
plugin_name = ("authentication_ldap_sasl_client.{}"
223
219
"" .format (plugin_ext ))
224
220
225
- if os .path .exists (plugin_name ):
221
+ self .log .debug ("ldap plugin_path: '{}'" .format (
222
+ os .path .join (plugin_path , plugin_name )))
223
+ if os .path .exists (os .path .join (plugin_path , plugin_name )):
226
224
bundle_plugin_libs = True
227
225
vendor_libs .append (
228
226
(plugin_path , [plugin_name ]))
@@ -274,10 +272,7 @@ def _copy_vendor_libraries(self):
274
272
sasl_plugin_libs .append (os .path .basename (lib_path_entry ))
275
273
sasl_libs .append ((sasl_libs_path , sasl_plugin_libs ))
276
274
277
- if not os .path .exists (os .path .join (self .private_folder )):
278
- mkpath (os .path .join (os .getcwd (), self .private_folder ))
279
-
280
- # Copy vendor libraries to 'mysql/private' folder
275
+ # Copy vendor libraries to 'mysql/vendor' folder
281
276
self .log .info ("Copying vendor libraries" )
282
277
for src_folder , files in sasl_libs :
283
278
self .log .info ("Copying folder: %s" , src_folder )
@@ -286,8 +281,7 @@ def _copy_vendor_libraries(self):
286
281
if not os .path .exists (src ):
287
282
self .log .warn ("Library not found: %s" , src )
288
283
continue
289
- dst = os .path .join (os .getcwd (),
290
- os .path .join (self .private_folder ))
284
+ dst = os .path .join (os .getcwd (), self .vendor_folder )
291
285
self .log .info ("copying %s -> %s" , src , dst )
292
286
shutil .copy (src , dst )
293
287
@@ -298,8 +292,7 @@ def _copy_vendor_libraries(self):
298
292
if not os .path .exists (sasl2_libs_path ):
299
293
self .log .info ("sasl2 llibraries not found at %s" ,
300
294
sasl2_libs_path )
301
- self .distribution .package_data = {
302
- "mysql" : ["vendor/*" , "private/*" ]}
295
+ self .distribution .package_data = {"mysql" : ["vendor/*" ]}
303
296
return
304
297
sasl2_libs_w = [
305
298
"libanonymous.*" , "libcrammd5.*.*" , "libdigestmd5.*.*.*.*" ,
@@ -319,8 +312,8 @@ def _copy_vendor_libraries(self):
319
312
320
313
sasl2_libs .append ((sasl2_libs_path , sasl2_scram_libs ))
321
314
322
- if not os .path .exists (os .path .join (self .private_folder , "sasl2" )):
323
- mkpath (os .path .join (os .getcwd (), self .private_folder , "sasl2" ))
315
+ if not os .path .exists (os .path .join (self .vendor_folder , "sasl2" )):
316
+ mkpath (os .path .join (os .getcwd (), self .vendor_folder , "sasl2" ))
324
317
325
318
# Copy vendor libraries to 'mysql/vendor/sasl2' folder
326
319
self .log .info ("Copying vendor libraries" )
@@ -329,15 +322,16 @@ def _copy_vendor_libraries(self):
329
322
for filename in files :
330
323
src = os .path .join (src_folder , filename )
331
324
if not os .path .exists (src ):
332
- self .log .warn ("Library not found: %s" , src )
325
+ self .log .warning ("Library not found: %s" , src )
333
326
continue
334
- dst = os .path .join (os .getcwd (),
335
- os .path .join (self .private_folder , "sasl2" ))
327
+ dst = os .path .join (
328
+ os .getcwd (),
329
+ os .path .join (self .vendor_folder , "sasl2" ))
336
330
self .log .info ("copying %s -> %s" , src , dst )
337
331
shutil .copy (src , dst )
338
332
339
333
self .distribution .package_data = {
340
- "mysql" : ["vendor/*" , "private/*" , "private /sasl2/*" ]}
334
+ "mysql" : ["vendor/*" , "vendor /sasl2/*" ]}
341
335
342
336
343
337
class BuildExt (build_ext , BaseCommand ):
0 commit comments