feat: small command line helpers for quick tests#4272
Open
henryiii wants to merge 1 commit into
Open
Conversation
3 tasks
henryiii
marked this pull request as draft
October 22, 2022 04:06
henryiii
force-pushed
the
henryiii/feat/clihelper
branch
from
October 25, 2022 16:45
2a0be18 to
108e975
Compare
Add --cflags, --ldflags, --embed, and --file to the pybind11 command
line tool, based on python-config. This makes quick one-off compiles
easy:
c++ $(python3 -m pybind11 --file=example.cpp)
Assisted-by: ClaudeCode:claude-fable-5
henryiii
force-pushed
the
henryiii/feat/clihelper
branch
from
July 22, 2026 23:47
108e975 to
13ec9d9
Compare
Collaborator
Author
|
🤖 AI text below 🤖 Rebased on current master as a single commit. Changes beyond the rebase:
|
henryiii
marked this pull request as ready for review
July 23, 2026 01:15
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
These are some small command line helpers intended for quick testing, based on
python-config.On a Unix system, it should be possible to do:
Or even:
c++ $(pybind11-config --file=pybindclass.cpp)This is handy for quick tests on issue reports.
Since I have to debug embedded code too, I also added support for
--embed:c++ $(pybind11-config --embed --file=pybindclass.cpp)Based on https://github.com/python/cpython/blob/3.11/Misc/python-config.in
Suggested changelog entry:
I can probably come up with a test or two.
📚 Documentation preview 📚: https://pybind11--4272.org.readthedocs.build/