Codebase list dh-python / 0efa08e
Factor out the function that moves extension modules to a separate destdir Stefano Rivera 1 year, 8 months ago
1 changed file(s) with 11 addition(s) and 12 deletion(s). Raw diff Collapse all Expand all
329329 raise Exception(msg)
330330 return result
331331
332 def move_to_ext_destdir(i, version, context):
333 """Move built C extensions from the general destdir to ext_destdir"""
334 ext_destdir = get_option('ext_destdir', i, version)
335 if ext_destdir:
336 move_matching_files(context['destdir'], ext_destdir,
337 get_option('ext_pattern', i, version),
338 get_option('ext_sub_pattern', i, version),
339 get_option('ext_sub_repl', i, version))
340
332341 func = None
333342 if cfg.clean_only:
334343 func = plugin.clean
373382 if step not in ('build', 'test'):
374383 exit(13)
375384 if step == 'install':
376 ext_destdir = get_option('ext_destdir', i, version)
377 if ext_destdir:
378 move_matching_files(c['destdir'], ext_destdir,
379 get_option('ext_pattern', i, version),
380 get_option('ext_sub_pattern', i, version),
381 get_option('ext_sub_repl', i, version))
385 move_to_ext_destdir(i, version, c)
382386 if failure:
383387 # exit with a non-zero return code if at least one build/test failed
384388 exit(13)
412416 run(plugin.build, i, version, c)
413417 if not is_disabled('install', i, version):
414418 run(plugin.install, i, version, c)
415 ext_destdir = get_option('ext_destdir', i, version)
416 if ext_destdir:
417 move_matching_files(c['destdir'], ext_destdir,
418 get_option('ext_pattern', i, version),
419 get_option('ext_sub_pattern', i, version),
420 get_option('ext_sub_repl', i, version))
419 move_to_ext_destdir(i, version, c)
421420 if not nocheck and not is_disabled('test', i, version):
422421 run(plugin.test, i, version, c)
423422 except Exception as err: