fix: remove backend-path to resolve ValueError: paths must be inside …#231
Merged
sellakumaran merged 4 commits intoApr 16, 2026
Merged
Conversation
…source tree
python -m build fails in CI with:
ValueError: paths must be inside source tree
This is thrown by pyproject_hooks.BuildBackendHookCaller.__init__ which
validates that all backend-path entries resolve inside the package source
directory. The backend-path = ["../../versioning/helper"] in each package's
pyproject.toml points outside the package tree, triggering this check before
any build code runs. Setting PYTHONPATH has no effect since the error fires
during path validation, not import.
Fix: remove backend-path from all 14 packages. The CI pipeline already exports
PYTHONPATH="${ROOT_DIR}/versioning/helper" which makes build_backend importable
in the hook subprocess. The custom backend and its S360 version constraint
injection are unaffected. uv build from the repo root continues to work for
local development.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aims to fix CI python -m build failures caused by pyproject_hooks rejecting backend-path entries that resolve outside each package’s source tree, by removing backend-path from all package pyproject.toml files and updating the build backend documentation accordingly.
Changes:
- Removed
backend-path = ["../../versioning/helper"]from 14 packagepyproject.tomlfiles. - Updated
versioning/helper/build_backend.pydocstring to describe resolving the backend viaPYTHONPATH.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| versioning/helper/build_backend.py | Updates documentation for how the custom build backend is resolved after removing backend-path. |
| libraries/microsoft-agents-a365-tooling/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-tooling-extensions-semantickernel/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-tooling-extensions-openai/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-tooling-extensions-googleadk/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-tooling-extensions-azureaifoundry/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-tooling-extensions-agentframework/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-runtime/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-observability-hosting/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-observability-extensions-semantickernel/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-observability-extensions-openai/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-observability-extensions-langchain/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-observability-extensions-agentframework/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-observability-core/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
| libraries/microsoft-agents-a365-notifications/pyproject.toml | Removes backend-path to avoid pyproject_hooks path validation failure. |
ajmfehr
previously approved these changes
Apr 16, 2026
gwharris7
previously approved these changes
Apr 16, 2026
Added PYTHONPATH environment variable pointing to versioning/helper during the "Install the project" step in the CI workflow. This ensures Python can locate necessary modules during installation.
Step-level env only applies to a single step. uv sync passed but uv build and tox steps still failed with ModuleNotFoundError: No module named build_backend. Moving PYTHONPATH to job-level env ensures it is available for all steps: uv sync, uv build, tox, and any future steps that invoke the build backend. Also fix docstring example in build_backend.py to include packaging in build-system.requires, matching what the packages actually declare.
ajmfehr
approved these changes
Apr 16, 2026
gwharris7
approved these changes
Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…source tree
python -m build fails in CI with:
ValueError: paths must be inside source tree
This is thrown by pyproject_hooks.BuildBackendHookCaller.init which validates that all backend-path entries resolve inside the package source directory. The backend-path = ["../../versioning/helper"] in each package's pyproject.toml points outside the package tree, triggering this check before any build code runs. Setting PYTHONPATH has no effect since the error fires during path validation, not import.
Fix: remove backend-path from all 14 packages. The CI pipeline already exports PYTHONPATH="${ROOT_DIR}/versioning/helper" which makes build_backend importable in the hook subprocess. The custom backend and its S360 version constraint injection are unaffected. uv build from the repo root continues to work for local development.