-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Support for Gcov coverage in extensions #3025
Comments
This requires the ability to pass "configuration options" to the build backend. Pip currently doesn't support this, mostly because most build backends don't use config options. To get this to work would need:
A simple UI would be easy enough to add to pip, but it's not likely to get much priority until backends start supporting user configuration in the PEP 517 interface. So I'd suggest you initially explore how to make this work with the setuptools project, and then we can look at the front end UI in pip. |
Agreed, it would probably be a good idea to push this to setuptools, since they’d be the right folks to decide on the mechanism they wanna use to enable pip doing something like this. |
Okay. Note that this is not about the copile flags per-say. Since this is a compiled component, I still need the setup.py, which I can configure to handle the CFLAGS. I added it to the example to make the example complete. But irrespectively of how the compiler get the added flags, no gcno files are generated when compiling with pip, only through |
I would like to ping this issue - as far as I can see, the only way to get Is there some guidance on how to get equivalent behavior to |
What's the problem this feature will solve?
I have a Python package with a Pybind11 extension and I'd like to create coverage reports for both the Python and the C++ code. I can do this by doing the following running:
This works because
-coverage
adds.gcno
files in the build directory, whichcoverage
recognizes and creates.gcda
files. Finally gcov is used to create gcov files.Describe the solution you'd like
Instead of using old not recommended
python setup.py
, I'd rather do something like:and have
setup.cfg
with:be enough to get a build directory with
.gcno
in it.Alternative Solutions
Yes with old python setup.py
Additional context
Obviously this assumes gcov is installed on the system.
Code of Conduct
The text was updated successfully, but these errors were encountered: