Skip to content

Commit 62098d7

Browse files
committed
Update on "[build] Fix flatc"
Fixes #8784 We need to install `build/pip_data_bin_init.py.in` into `<executorch root>/data/bin/__init__.py`. This PR rewrite the logic into a `BuiltFile` so that it works well in editable mode. Since `BuiltFile` by default looks into cmake cache directory, this PR adds a placeholder `%CMAKE_CACHE_DIR%` for those are actually built by CMake and for `build/pip_data_bin_init.py.in` we don't add this placeholder. Test: ``` python -c "from executorch.data.bin import flatc" ``` Will add unit test in next PR. [ghstack-poisoned]
1 parent 1203790 commit 62098d7

File tree

3 files changed

+2
-1
lines changed

3 files changed

+2
-1
lines changed

.github/workflows/pull.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
PYTHON_EXECUTABLE=python bash ./install_executorch.sh --editable --pybind xnnpack --use-pt-pinned-commit
8080
# Try to import extension library
8181
python -c "from executorch.extension.llm.custom_ops import custom_ops"
82+
python -c "from executorch.data.bin import flatc"
8283
8384
test-models-linux:
8485
name: test-models-linux

.github/workflows/trunk.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash ./install_executorch.sh --editable --pybind xnnpack
6161
# Try to import extension library
6262
python -c "from executorch.extension.llm.custom_ops import custom_ops"
63+
python -c "from executorch.data.bin import flatc"
6364
6465
test-models-macos:
6566
name: test-models-macos

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ flatc = "executorch.data.bin:flatc"
8888
[tool.setuptools.package-dir]
8989
"executorch.backends" = "backends"
9090
"executorch.codegen" = "codegen"
91-
"executorch.data.bin" = "data/bin"
9291
# TODO(mnachin T180504136): Do not put examples/models
9392
# into core pip packages. Refactor out the necessary utils
9493
# or core models files into a separate package.

0 commit comments

Comments
 (0)