Skip to content

fix: resolve API build directories from the caller - #325

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
jadenfix:fix-relative-api-build-directories
Oct 18, 2026
Merged

gaborbernat merged 1 commit into
tox-dev:mainfrom
jadenfix:fix-relative-api-build-directories

Conversation

@jadenfix

Copy link
Copy Markdown
Contributor

Calling frontend.build_wheel(Path("artifacts")) from outside the project creates artifacts in the caller's directory, then passes that relative path to a backend running inside the project. The backend therefore writes somewhere else or raises FileNotFoundError. The sdist, editable and metadata hooks have the same mismatch.

Pass absolute paths for the known build/metadata directory arguments while retaining caller-relative result paths. Use absolute() so symlink spelling is preserved. Generic send_cmd arguments and configuration values retain their existing behavior. Document the directory interpretation in the API reference. This complements the CLI fix in #316 without changing CLI behavior.

Validation:

  • Twelve filesystem cases fail seven relative-path cases on baseline while five absolute controls pass; all pass after the fix. An additional test checks generic relative-path/configuration preservation.
  • Official tox environments 3.11,3.12,3.13,3.14,3.15 each pass 115 tests with 100% source/test coverage on macOS. The installed 3.15 interpreter reports 3.15.0rc2. Official type,docs,pkg_meta,dev,fix also pass, including all 11 pre-commit hooks, strict documentation, Twine and wheel-content checks.
  • A separately installed Python 3.11 wheel passes 13 real artifact checks: sdist/wheel/editable generation, archive inspection, imports from generated wheels in fresh processes, metadata preparation and builds using relative existing metadata. The identical consumer fails on the baseline wheel. The local consumer adapts the copied demo backend's optional-metadata ZIP member names to generate valid wheels; no upstream fixture change is included.
  • git diff --check passes. Hosted CI, Windows/Linux and free-threaded Python remain unverified.

Codex assisted with investigation, implementation and tests. Another Codex agent independently reviewed the exact commit and ran the focused tests and installed-wheel consumer. No human review or production incident is claimed.

@gaborbernat
gaborbernat enabled auto-merge (squash) October 18, 2026 16:16
@gaborbernat
gaborbernat merged commit 23cd8d1 into tox-dev:main Oct 18, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants