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.
What a goose chase. Removing
--no-isolation
got it working. (Previously it didn't work without this.)The problem, I think, was something about non-isolated PEP-517 build process not fully inheriting the readthedocs virtual environment?
You can see that the
Running PEP 517 backend to build a wheel for <Link file:///home/docs/checkouts/readthedocs.org/user_builds/stackstac/checkouts/252 (from None)>
fails in a build like this one: https://readthedocs.org/projects/stackstac/builds/25268793/What I notice in the traceback is that at first, PDM is running in its own self-managed venv in
/home/docs/.local
:But then we get
Notice this is running in
/home/docs/.asdf
instead of/home/docs/.local
. So a different environment.I don't know much about PEP-517 builds or the PDM internals, but my guess here is kinda that, in non-isolated mode, PDM is supposed to ensure that the PEP-517
build-system.requires
packages (pdm-pep517
) are installed in the current(?) environment, then invoke the Python executable as a subprocess to do the actual build. But I think it's invoking the wrong subprocess / not ensuring that subprocess is in the same environment. So it basically runs "system" Python (the Python shim installed by asdf??), wherepdm-pep517
isn't actually installed.tl;dr I'm guessing that in non-isolated mode, PDM is ensuring
pdm-pep517
is installed in the current environment before calling a subprocess to build the wheel, but doesn't actually run that subprocess in the current environment.