-
Notifications
You must be signed in to change notification settings - Fork 735
Fix build isolation and editable install issues #15941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/15941
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New Failure, 1 PendingAs of commit bd35c44 with merge base 23fc78f ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
0008c52 to
dda7b84
Compare
| if self.editable_mode: | ||
| # In editable mode, the package directory is the original source directory | ||
| dst_root = self.get_package_dir(".") | ||
| dst_root = self.get_package_dir("executorch") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious, is this the symlinked folder or the actual source folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the one under src/, so src/executorch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like tests are failing to build the package with the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just rebased, let's see
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.
dda7b84 to
bd35c44
Compare
|
It would be good to validate whether the new format in your PR is compatible with 77.0.3 |
Oh I think v75.8.0 is the version with this error: v77.0.3 works well. v80.9.0 works well. |
Summary:
This PR fixes two issues affecting the build and installation process:
pyproject.toml configuration: Fixed invalid
licenseandlicense-filesfields that were causing build failures with newer versions ofsetuptoolsandpipbuild isolation. Thelicensefield now uses the table format{text = ...}andlicense-fileswas moved to[tool.setuptools].Editable install version.py: Fixed an issue where
version.pywas being written to the project root instead of the package directory (src/executorch) during editable installs. This was causingImportError: cannot import name 'version'when importingexecutorch.Test Plan:
pip install . --no-build-isolationworks (metadata generation succeeds).pip install -e . --no-build-isolationworks andfrom executorch import versionsucceeds.Summary
[PLEASE REMOVE] See CONTRIBUTING.md's 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: " label. For a list of available release notes labels, check out CONTRIBUTING.md's 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 @GregoryComer