fix(python): add mlir[.dialects] as namespace packages

I initially thought there were missing init files, but it was intended
that mlir and mlir.dialects are namespace packages
This commit is contained in:
youben11
2021-11-04 16:56:43 +01:00
committed by Ayoub Benaissa
parent c401b5ae44
commit 0670d4efc1
2 changed files with 5 additions and 13 deletions

View File

@@ -31,18 +31,6 @@ This will build the image for the appropriate python version then copy the wheel
### Build wheels in your environment
#### Temporary MLIR issue
Due to an issue with MLIR, you will need to manually add `__init__.py` files to the `mlir` python package after the build.
```bash
$ make python-bindings
$ touch build/tools/zamalang/python_packages/zamalang_core/mlir/__init__.py
$ touch build/tools/zamalang/python_packages/zamalang_core/mlir/dialects/__init__.py
```
#### Build wheel
Building the wheels is actually simple.
```bash

View File

@@ -38,7 +38,11 @@ setuptools.setup(
url="https://github.com/zama-ai/homomorphizer",
packages=setuptools.find_packages(
where="build/tools/zamalang/python_packages/zamalang_core",
include=["zamalang", "zamalang.*", "mlir", "mlir.*"],
include=["zamalang", "zamalang.*"],
)
+ setuptools.find_namespace_packages(
where="build/tools/zamalang/python_packages/zamalang_core",
include=["mlir", "mlir.*"],
),
package_dir={"": "build/tools/zamalang/python_packages/zamalang_core"},
include_package_data=True,