Repository navigation
Commit 40c1564
fix(cli): resolve output directories before invoking backends (#316)
## Summary
Resolve the CLI's selected output directory against the caller's working
directory before passing it to the frontend. Previously, `python -m
pyproject_api project --wheel` created `project/dist` in the caller's
directory, then sent `project/dist` to a backend already running inside
`project`, causing the demo backend to raise `FileNotFoundError`.
The runtime change is one expression. Add nine end-to-end cases using
the repository's existing demo backend for default, relative and
absolute output paths across sdist/wheel/editable builds. They check
real generated artifacts; no subprocess behavior is mocked. The pristine
source fails six cases, while the three absolute-path controls pass.
Adjust two existing argument-test expectations and document the CLI path
interpretation.
This keeps symlink interpretation intact (`absolute()`, not `resolve()`)
and leaves generic frontend path/configuration arguments unchanged.
## Validation
- Linux Python3.11.17,3.12.15,3.13.16,3.14.8, stable3.15.0 and
free-threaded3.15.0: official tox baseline74 passed → patched83 passed
in every environment, all reaching the configured100% coverage gate.
- Official tox `fix`, `type`, `docs` and `pkg_meta` passed; fixed
pre-commit hooks did not modify the three candidate files. Linux tested
copies match the canonical worktree byte for byte.
- Windows Python3.12.14: CLI tests16 passed; full-suite baseline73
passed/1 failed and patch82 passed/1 failed. The same unchanged
`test_ensure_empty_dir_on_path_symlink_to_folder` fails with
WinError1314 because this account cannot create directory symlinks.
- The original CLI repro now creates the real demo wheel at the expected
path.
- Read-only AI review found no actionable issue; no independent human
review is claimed.
Hosted CI and macOS are unverified. AI assistance was used for
investigation, tests, implementation and review; no production incident
is claimed.
Closes #315
Remote verification: ReadTheDocs and pre-commit.ci succeeded. [Actions
run38507824873](https://github.com/tox-dev/pyproject-api/actions/runs/38507824873)
is `action_required`, awaiting maintainer approval to run; hosted tests
are not yet verified.
---------
Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>1 parent c58293e commit 40c1564
2 files changed
Lines changed: 35 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
15 | 47 | | |
16 | 48 | | |
17 | 49 | | |
| |||
24 | 56 | | |
25 | 57 | | |
26 | 58 | | |
27 | | - | |
| 59 | + | |
28 | 60 | | |
29 | 61 | | |
30 | 62 | | |
31 | 63 | | |
32 | 64 | | |
33 | | - | |
| 65 | + | |
34 | 66 | | |
35 | 67 | | |
36 | 68 | | |
| |||
0 commit comments