bpo-36085: Enable better DLL resolution on Windows by zooba · Pull Request #12302 · python/cpython
zooba
deleted the
bpo-36085
branch
lazka added a commit to lazka/MINGW-packages that referenced this pull request
…#5146 This is also a problem with meson which tries to execute things in the build directory using the build directory DLLs by prepending those to PATH. Since meson uses a Python helper the PATH gets updated to include the system prefix first which makes things link against the installed libraries instead and fail because symbols are missing. One of the reasons why this was added in the first place is that Python loads C extensions in lib-dynload which then can't find the libraries in prefix (e.g. "import tkinter") if it isn't in PATH. By moving the prefix at the end of PATH we make both cases work. Starting with Python 3.8 C extensions will no longer use PATH for loading DLL dependencies, see python/cpython#12302 so we will have to look into this again then.
lazka
mentioned this pull request
lazka added a commit to lazka/MINGW-packages that referenced this pull request
…5146 This is also a problem with meson which tries to execute things in the build directory using the build directory DLLs by prepending those to PATH. Since meson uses a Python helper the PATH gets updated to include the system prefix first which makes things link against the installed libraries instead and fail because symbols are missing. One of the reasons why this was added in the first place is that Python loads C extensions in lib-dynload which then can't find the libraries in prefix (e.g. "import tkinter") if it isn't in PATH. By moving the prefix at the end of PATH we make both cases work. Starting with Python 3.8 C extensions will no longer use PATH for loading DLL dependencies, see python/cpython#12302 so we will have to look into this again then.
stahta01 pushed a commit to stahta01/MINGW-packages that referenced this pull request
…5146 This is also a problem with meson which tries to execute things in the build directory using the build directory DLLs by prepending those to PATH. Since meson uses a Python helper the PATH gets updated to include the system prefix first which makes things link against the installed libraries instead and fail because symbols are missing. One of the reasons why this was added in the first place is that Python loads C extensions in lib-dynload which then can't find the libraries in prefix (e.g. "import tkinter") if it isn't in PATH. By moving the prefix at the end of PATH we make both cases work. Starting with Python 3.8 C extensions will no longer use PATH for loading DLL dependencies, see python/cpython#12302 so we will have to look into this again then.
zooba
mentioned this pull request
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters