Why no standard Python setup script for MLIR bindings?

Hi all,

I’m using MLIR’s Python bindings currently and noticed there’s no standard setup.py/pyproject.toml in upstream for building installable packages unlike other Python projects do. I need to set PYTHONPATH to the build dir or manually write custom setup scripts.
​​So my question is:​​ What’s the design reason for not providing conventional Python packaging?
Is this intentional for downstream integration flexibility, or are there other constraints?

Thanks

Beyond the usual nobody needed it enough to contribute an implementation, MLIR is not a Python project, it’s a set of C++ library that have Python bindings. If somebody contributes a Python feature that doesn’t interfere with the C++ build system and commits to maintaining it, we may well accept it.

It’s been discussed many times and it’s on my TODO list to smooth out. Recently I sent a PR that demo/sketched a pyproject.toml:

[mlir][python] add MLIR_BINDINGS_PYTHON_INSTALL_PREFIX to make bindings install dir configurable

but I didn’t land the toml itself because it would’ve taken refactoring the CI. You can find an example toml here and another here.

Good news: there is now a checked in example/demo for how to build Python bindings wheels: