We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I'm trying to figure out how to turn on code coverage for Cython files in my project here: https://github.com/uber/h3-py
Based on these notes:
it sounds like the first step is to define CYTHON_TRACE=1.
CYTHON_TRACE=1
With scikit-build, I'm not sure if I should be doing this in the setup.py file, the cmake files, or elsewhere.
setup.py
Has anyone else gotten this to work, and could offer some pointers? Thanks!
The text was updated successfully, but these errors were encountered:
I suggest you try the following:
python setup.py build -- -DCYTHON_FLAGS:STRING="--directive profile=True" -DCMAKE_CXX_FLAGS:STRING=-DCYTHON_TRACE=1
or
CXXFLAGS=-DCYTHON_TRACE=1 python setup.py build -- -DCYTHON_FLAGS:STRING="--directive profile=True"
CYTHON_FLAGS is a cache variable allowing to pass additional options to cython executable: * It is briefly documented at https://scikit-build.readthedocs.io/en/latest/cmake-modules/Cython.html#command:add_cython_target * Implementation is in the UseCython module (see here and here)
CYTHON_FLAGS
UseCython
Cython compiler directives are documented at https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#compiler-directives and can be passed to cython executable using the -X or --directive argument.
cython
-X
--directive
To define CYTHON_TRACE, there are few possible approaches:
CYTHON_TRACE
CXXFLAGS
Sorry, something went wrong.
I would also suggest that add these lines to your CMakeLists.txt:
if(DEFINED ENV{BUILD_COV}) add_compile_definitions(CYTHON_TRACE=1) set(CYTHON_FLAGS "-X linetrace=True") endif()
This way you can enable linetrace by set environment variable BUILD_COV
BUILD_COV
No branches or pull requests
I'm trying to figure out how to turn on code coverage for Cython files in my project here: https://github.com/uber/h3-py
Based on these notes:
it sounds like the first step is to define
CYTHON_TRACE=1
.With scikit-build, I'm not sure if I should be doing this in the
setup.py
file, the cmake files, or elsewhere.Has anyone else gotten this to work, and could offer some pointers? Thanks!
The text was updated successfully, but these errors were encountered: