Stella Laurenzo | 41a2ceb | 2022-04-29 12:49:36 -0700 | [diff] [blame] | 1 | # IREE Compiler |
| 2 | |
| 3 | This directory contains the IREE compiler sources. |
| 4 | |
| 5 | ## Standalone Python Builds |
| 6 | |
| 7 | The included `setup.py` file can be used to build Python binaries or directly |
| 8 | install the IREE compiler API. Do note that the compiler is quite heavy and |
| 9 | unless you are developing it and on a significant machine, you will want to |
| 10 | use released binaries. |
| 11 | |
| 12 | There are two ways to build/install Python packages: |
| 13 | |
| 14 | * Directly from the source tree (this is how official releases are done). |
| 15 | * From the build directory while developing. |
| 16 | |
| 17 | It is recommended to use your favorite method for managing |
| 18 | [virtual environemnts](https://docs.python.org/3/library/venv.html) instead |
| 19 | of modifying the system installation. |
| 20 | |
| 21 | Only relatively recent versions of `pip` are supported. Always use the latest |
| 22 | via `pip install --upgrade pip`. |
| 23 | |
| 24 | You can build either from the source or build tree (assumes that CMake has |
| 25 | been configured and the project built). The latter is typically used by |
| 26 | project developers who are already setup for development and want to |
| 27 | incrementally generate Python packages without rebuilding. |
| 28 | |
| 29 | To build a wheel that can be installed on the same Python version and OS: |
| 30 | |
| 31 | ``` |
| 32 | python -m pip wheel compiler/ |
| 33 | ``` |
| 34 | |
| 35 | To directly install: |
| 36 | |
| 37 | ``` |
| 38 | python -m pip install compiler/ |
| 39 | ``` |