lgpage/pytest-cython

Support out-of-source builds

Opened this issue · 0 comments

Is your feature request related to a problem? Please describe.

Currently, it is required that the cython files are built before running the pytests in such a way that the compiled artifacts are placed next to the source files. However, many build systems (such as meson, which gets more and more popular with python projects) place the .so files in a build-directory and not in the source folder. In this case, pytest-cython is simply doing nothing.

Describe the solution you'd like

Support out-of-source builds.

Additional context

It should work to use importlib to try to load the built cython module.