Commit 6a23b482 authored by David Hendriks's avatar David Hendriks
Browse files

Fixed all the tmp_dir to be set correctly

parent 8fea983b
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -389,13 +389,19 @@ def create_and_load_logging_function(
    else:
        tmp_dir = custom_tmp_dir

    custom_logging_dir = os.path.join(tmp_dir, 'custom_logging')

    # Create the subdir for the custom_logging code
    os.makedirs(custom_logging_dir, exist_ok=True)

    # 
    library_name = os.path.join(
        temp_dir(), "libcustom_logging_{}.so".format(uuid.uuid4().hex)
        custom_logging_dir, "libcustom_logging_{}.so".format(uuid.uuid4().hex)
    )

    compile_shared_lib(
        custom_logging_code,
        sourcefile_name=os.path.join(temp_dir(), "custom_logging.c"),
        sourcefile_name=os.path.join(custom_logging_dir, "custom_logging.c"),
        outfile_name=library_name,
        verbose=verbose,
    )