Commit 0c3d779
authored
Fix build isolation and editable install issues (#15941)
Summary:
This PR fixes two issues affecting the build and installation process:
1. **pyproject.toml configuration**: Fixed invalid `license` and
`license-files` fields that were causing build failures with newer
versions of `setuptools` and `pip` build isolation. The `license` field
now uses the table format `{text = ...}` and `license-files` was moved
to `[tool.setuptools]`.
2. **Editable install version.py**: Fixed an issue where `version.py`
was being written to the project root instead of the package directory
(`src/executorch`) during editable installs. This was causing
`ImportError: cannot import name 'version'` when importing `executorch`.
Test Plan:
- Verified `pip install . --no-build-isolation` works (metadata
generation succeeds).
- Verified `pip install -e . --no-build-isolation` works and `from
executorch import version` succeeds.
### Summary
[PLEASE REMOVE] See [CONTRIBUTING.md's Pull
Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests)
for ExecuTorch PR guidelines.
[PLEASE REMOVE] If this PR closes an issue, please add a `Fixes
#<issue-id>` line.
[PLEASE REMOVE] If this PR introduces a fix or feature that should be
the upcoming release notes, please add a "Release notes: <area>" label.
For a list of available release notes labels, check out
[CONTRIBUTING.md's Pull
Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests).
### Test plan
[PLEASE REMOVE] How did you test this PR? Please write down any manual
commands you used and note down tests that you have written if
applicable.
cc @GregoryComer1 parent 0f3d1b2 commit 0c3d779
2 files changed
+6
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
100 | 103 | | |
101 | 104 | | |
102 | 105 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
61 | 60 | | |
62 | 61 | | |
63 | 62 | | |
| |||
552 | 551 | | |
553 | 552 | | |
554 | 553 | | |
555 | | - | |
| 554 | + | |
556 | 555 | | |
557 | 556 | | |
558 | 557 | | |
| |||
0 commit comments