Skip to content

Commit b55ecc7

Browse files
committed
Fix version.py
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
1 parent 0589cea commit b55ecc7

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

pyproject.toml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ Changelog = "https://github.com/pytorch/executorch/releases"
8484
[project.scripts]
8585
flatc = "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"

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)