Packaging a python library with C++ distutils extension?

Two updates:

  • It seems to work perfectly fine if I just skip the test suite, so there’s some divergence between the test environment and the built package.
  • The built .so appears to live in build/lib.linux-x86_64-3.9/ffcv/_libffcv.cpython-39-x86_64-linux-gnu.so. Why is that not in PYTHONPATH when running tests?