Skip to content

Commit 23785d2

Browse files
fix: remove backend-path to resolve ValueError: paths must be inside … (#231)
* fix: remove backend-path to resolve ValueError: paths must be inside 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. * Set PYTHONPATH for install step in CI workflow 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. * fix: set PYTHONPATH at job level so all steps can import build_backend 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. --------- Co-authored-by: Grant Harris <96964444+gwharris7@users.noreply.github.com>
1 parent dc936b1 commit 23785d2

16 files changed

Lines changed: 12 additions & 19 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ jobs:
8585
defaults:
8686
run:
8787
working-directory: ./
88+
env:
89+
PYTHONPATH: ${{ github.workspace }}/versioning/helper
8890

8991
strategy:
9092
matrix:

libraries/microsoft-agents-a365-notifications/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = ["setuptools>=68", "wheel", "tzdata", "tomlkit", "packaging"]
33
build-backend = "build_backend"
4-
backend-path = ["../../versioning/helper"]
54

65
[project]
76
name = "microsoft-agents-a365-notifications"

libraries/microsoft-agents-a365-observability-core/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = ["setuptools>=68", "wheel", "tzdata", "tomlkit", "packaging"]
33
build-backend = "build_backend"
4-
backend-path = ["../../versioning/helper"]
54

65
[project]
76
name = "microsoft-agents-a365-observability-core"

libraries/microsoft-agents-a365-observability-extensions-agentframework/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = ["setuptools>=68", "wheel", "tzdata", "tomlkit", "packaging"]
33
build-backend = "build_backend"
4-
backend-path = ["../../versioning/helper"]
54

65
[project]
76
name = "microsoft-agents-a365-observability-extensions-agent-framework"

libraries/microsoft-agents-a365-observability-extensions-langchain/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = ["setuptools>=68", "wheel", "tzdata", "tomlkit", "packaging"]
33
build-backend = "build_backend"
4-
backend-path = ["../../versioning/helper"]
54

65
[project]
76
name = "microsoft-agents-a365-observability-extensions-langchain"

libraries/microsoft-agents-a365-observability-extensions-openai/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = ["setuptools>=68", "wheel", "tzdata", "tomlkit", "packaging"]
33
build-backend = "build_backend"
4-
backend-path = ["../../versioning/helper"]
54

65
[project]
76
name = "microsoft-agents-a365-observability-extensions-openai"

libraries/microsoft-agents-a365-observability-extensions-semantickernel/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = ["setuptools>=68", "wheel", "tzdata", "tomlkit", "packaging"]
33
build-backend = "build_backend"
4-
backend-path = ["../../versioning/helper"]
54

65
[project]
76
name = "microsoft-agents-a365-observability-extensions-semantic-kernel"

libraries/microsoft-agents-a365-observability-hosting/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = ["setuptools>=68", "wheel", "tzdata", "tomlkit", "packaging"]
33
build-backend = "build_backend"
4-
backend-path = ["../../versioning/helper"]
54

65
[project]
76
name = "microsoft-agents-a365-observability-hosting"

libraries/microsoft-agents-a365-runtime/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = ["setuptools>=68", "wheel", "tzdata", "tomlkit", "packaging"]
33
build-backend = "build_backend"
4-
backend-path = ["../../versioning/helper"]
54

65
[project]
76
name = "microsoft-agents-a365-runtime"

libraries/microsoft-agents-a365-tooling-extensions-agentframework/pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[build-system]
22
requires = ["setuptools>=68", "wheel", "tzdata", "tomlkit", "packaging"]
33
build-backend = "build_backend"
4-
backend-path = ["../../versioning/helper"]
54

65
[project]
76
name = "microsoft-agents-a365-tooling-extensions-agentframework"

0 commit comments

Comments
 (0)