Repository navigation
Enable the C ABI library option - #109
Merged
Merged
Conversation
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>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #109 +/- ##
==========================================
+ Coverage 78.57% 85.36% +6.79%
==========================================
Files 2 2
Lines 14 82 +68
Branches 0 7 +7
==========================================
+ Hits 11 70 +59
- Misses 3 7 +4
- Partials 0 5 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
2 of 11 tasks
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>
Contributor
Test Results4 tests +3 4 ✅ +3 1s ⏱️ -1s Results for commit 92f7f3e. ± Comparison against base commit 268627e. This pull request removes 1 and adds 4 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
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>
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
Regenerates the project from the base template with
add_c_abi: true(Copier update to basec40b5eb).cpp/python-template-cpp/buildslibpython_template_cpp, a C ABI over the C++ code, declared inpython_template_cpp/include/python_template_cpp/python_template_cpp.h.cpp/python/extension.cppis the pybind11 extension and links the library through hatch-cppdepends.cpp/CMakeLists.txtbuilds and installs the library without Python, with a package config and a pkg-config file.find_packageconsumer against the CMake install.This requires
hatch-cpp>=0.6.0. It is the first run of the option on Windows and in Pyodide, where the extension compiles the library sources in.Type of Change
Checklist
make lint)make test)