File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,13 @@ Changelog = "https://github.com/pytorch/executorch/releases"
8484[project .scripts ]
8585flatc = " executorch.data.bin:flatc"
8686
87+ # Tell setuptools to follow the symlink: src/executorch/exir -> exir.
88+ # Doing this allows us to import from executorch.exir directly in
89+ # editable mode.
90+ [tool .setuptools .packages .find ]
91+ where = [" src/" ]
92+ include = [" executorch.exir" ]
93+
8794# TODO(dbort): Could use py_modules to restrict the set of modules we
8895# package, and package_data to restrict the set up non-python files we
8996# include. See also setuptools/discovery.py for custom finders.
@@ -97,7 +104,6 @@ flatc = "executorch.data.bin:flatc"
97104"executorch.examples.apple.coreml.llama" = " examples/apple/coreml/llama"
98105"executorch.examples.llm_pte_finetuning" = " examples/llm_pte_finetuning"
99106"executorch.examples.models" = " examples/models"
100- "executorch" = " src/executorch"
101107"executorch.extension" = " extension"
102108"executorch.kernels.quantized" = " kernels/quantized"
103109"executorch.schema" = " schema"
Original file line number Diff line number Diff line change @@ -575,8 +575,7 @@ def run(self):
575575 # In editable mode, the package directory is the original source directory
576576 dst_root = self .get_package_dir ("." )
577577 else :
578- dst_root = os .path .join (self .build_lib , self .get_package_dir ("executorch" ))
579-
578+ dst_root = os .path .join (self .build_lib , "executorch" )
580579 # Create the version file.
581580 Version .write_to_python_file (os .path .join (dst_root , "version.py" ))
582581
You can’t perform that action at this time.
0 commit comments