Skip to content

feat: small command line helpers for quick tests #4272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Oct 21, 2022

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:

c++ pybindclass.cpp $(pybind11-config --cflags) $(pybind11-config --ldflags) -o pybindclass.$(python-config --extension-suffix)

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:

* Small extra features added to the pybind11 command line tool based on python-config.

I can probably come up with a test or two.

@henryiii henryiii marked this pull request as draft October 22, 2022 04:06
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
…h python-config.sh

Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
@henryiii henryiii force-pushed the henryiii/feat/clihelper branch from 2a0be18 to 108e975 Compare October 25, 2022 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant