Repository navigation
Conversation
The cpp template's C consumer test added the library directory to PATH only when the compiler was cl. GitHub's Windows runners have MinGW gcc on PATH before cl, so the test built the program with gcc and it exited with STATUS_DLL_NOT_FOUND. Set PATH on Windows for any compiler. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
timkpaine
added a commit
to python-project-templates/python-template-cpp
that referenced
this pull request
Nov 14, 2026
Windows runners find MinGW gcc before cl, and the program needs the library directory on PATH either way. The same change is in python-project-templates/base#223. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
cibuildwheel runs delvewheel on Windows by default, and it failed with "Unable to find library" for the DLL the wheel already ships. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
timkpaine
added a commit
to python-project-templates/python-template-cpp
that referenced
this pull request
Nov 14, 2026
cibuildwheel runs delvewheel on Windows by default, and it cannot find the DLL the wheel already ships. The same change is in python-project-templates/base#223. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
python-templates-automerge Bot
pushed a commit
to python-project-templates/python-template-cpp
that referenced
this pull request
Nov 14, 2026
* Enable the C ABI library option Regenerate from the base template with add_c_abi. The sources split into cpp/python-template-cpp, which builds libpython_template_cpp with a C surface, and cpp/python, the pybind11 extension that links it. cpp/CMakeLists.txt builds and installs the library without Python. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com> * Set PATH for the Windows consumer program with any compiler Windows runners find MinGW gcc before cl, and the program needs the library directory on PATH either way. The same change is in python-project-templates/base#223. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com> * Exclude the C ABI library from delvewheel repair cibuildwheel runs delvewheel on Windows by default, and it cannot find the DLL the wheel already ships. The same change is in python-project-templates/base#223. Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com> --------- Signed-off-by: Tim Paine <3105306+timkpaine@users.noreply.github.com>
5 of 11 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Two Windows failures from python-project-templates/python-template-cpp#109, the first Windows run of
add_c_abiin thecpptemplate:PATHonly when the compiler wascl. GitHub's Windows runners have MinGWgcconPATHbeforecl, so the test built the program withgccand it exited withSTATUS_DLL_NOT_FOUND. The test now setsPATHon Windows for any compiler.delvewheel repairon Windows by default, and it failed withUnable to find libraryfor the DLL the wheel already ships. The Windows repair command now excludes it, as therusttemplate does.In that run the extension import, the ctypes load, and the CMake
find_packageconsumer passed on Windows.Type of Change
Checklist
make lint)make test)