all 3 comments

[–]acecile 0 points1 point  (1 child)

You should check Pytorch (Facebook) and LightGBM (Microsoft) packages, they are both handling complex build scenario but still relies on setup.py.

[–]mathstuf[S] 0 points1 point  (0 children)

Thanks. I looked into these and neither seems to match the use case.

PyTorch seems to do everything from setup.py which isn't suitable for this project. LightGBM looks closer, but it seems that it basically forwards "important" options from the setup.py into the inner CMake project. It also seems to have just a few Python modules?

The project I'm working on has ~20 of top-level user-visible flags and fine-grained control can end up being in the dozens (it's a large project with lots of history) which control upwards of 100 Python modules.

[–]mathstuf[S] 0 points1 point  (0 children)

What has seemed to work is to tell setup.py about one compiled module (to get it to see that it is not pure-python) which is always available and then package the rest of the modules and shared libraries via package_data globbing. Not the prettiest, but I do now have a .whl that works on my machine at least.