From 4be6e9009a16251e6c99141167738e3813e03993 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Mon, 1 Jul 2019 13:26:03 +0200 Subject: [PATCH] Move temporary location for shared objects into build directory --- setup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 84547d361..ad2ea2823 100755 --- a/setup.py +++ b/setup.py @@ -467,8 +467,9 @@ def compile_c_extension(kenv, module, incremental, compilation_database, sources todo[original_src] = cmd if todo: parallel_run(todo) - dest = os.path.join(base, module + '.temp.so') - real_dest = dest[:-len('.temp.so')] + '.so' + dest = os.path.join(build_dir, module + '.so') + real_dest = os.path.join(base, module + '.so') + os.makedirs(os.path.dirname(dest), exist_ok=True) if not incremental or newer(real_dest, *objects): # Old versions of clang don't like -pthread being passed to the linker # Don't treat linker warnings as errors (linker generates spurious