This allows users to `pip install lib/Bindings/Python`. Similarly,
this supports `pip wheel lib/Bindings/Python`. The script generally
follows https://github.com/llvm/torch-mlir/pull/256, with some tweaks
that are specific to CIRCT's CMake choices (e.g. using an external
projects unified build).
This is mostly mechanical for us. Some notable changes:
* Require a unified build for Python in CMake, docs, and CI
* New CMake defaults for some variables in CMakeLists.txt
* Use the new CMake functions for Python bindings and PyCDE
* Update imports for generated Python and Python extension libraries
* Update PYTHONPATH to reflect the new location under unified builds
* Use the `Python3_EXECUTABLE` found by CMake itself (alongside the libs
and includes) to execute integration tests. This should no longer
require explicitly specifying a python executable in most cases. Where
needed, users can always override `Python3_EXECUTABLE`.
* Add `capnp` requirement on ESI tests. Otherwise the test fails on
systems that build the Python bindings but have no capnp.
* Add some guidance for users that are mainly interested in the Python
bindings of CIRCT. Fixes#1072.