# HG changeset patch # User Stefan Behnel <stefan_ml@behnel.de> # Date 1586461902 -7200 # Thu Apr 09 21:51:42 2020 +0200 # Node ID 41b1bc136cde2b8c9750f7dd670d8e1bd4a4a046 # Parent a077d2c14d5d25817376f1cb37ad624b8d5d6927 Try to fix cython.inline() on Windows with Py3.8+ where the DLL loading requires an explicit registration of the extension output directory. diff --git a/Cython/Build/Inline.py b/Cython/Build/Inline.py --- a/Cython/Build/Inline.py +++ b/Cython/Build/Inline.py @@ -261,6 +261,13 @@ build_extension.build_lib = lib_dir build_extension.run() + try: + add_dll_directory = os.add_dll_directory + except AttributeError: + pass + else: + add_dll_directory(os.path.dirname(module_path)) + module = load_dynamic(module_name, module_path) _cython_inline_cache[orig_code, arg_sigs, key_hash] = module.__invoke