-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
poetry install does not honor build-system.requires
#6154
Comments
Same issue on macOS 12.5. A dirty hack is to add the following at the top of import subprocess
try:
import pybind11
except ImportError:
subprocess.run(["pip", "install", "pybind11"]) The exact same issue was described in #2789, which was marked as solved, but the issue is still present on Poetry 1.2.0b3. I didn't check if this is a regression from when this PR was merged. |
This is currently intentional -- Poetry has never respected the |
Re: this being a regression, the changes in that PR were explicitly scoped to use of build scripts. Also, Poetry does not perform builds in an isolated/pep 517 environment, but instead uses the 'main' environment |
Is this the same issue as |
+1, having exact same issue |
@neersighted For me this issue occurs when I have a GIT-dependency that has Also, it does seem poetry uses an isolated environment to build this package.
`/tmp/tmpx6y_j1ku/.venv/bin/pip list`
|
Your issue is entirely different @randolf-scholz -- this issue is about |
I believe @randolf-scholz's issue is what I've reported as a separate issue in #7702, I couldn't find any other issue about it. |
I raised this at #7909 as a potentially separate issue, but it might be the same thing I'm encountering. The pyproject.toml is available on the linked issue, but for a TLDR here, we have a Full stack from our failing
|
Trying to clarify some statements:
Not the same issue, only similar. #2789 descibes the use of a build script with
Maybe, that was true in the past, but it's not anymore for all kinds of Poetry-managed projects (at least since #5401). I think it's still true for projects without build scripts but in this case there are no build-system requirements except for poetry-core anyway. As it seems projects with build scripts are built in an isolated environment (no matter if
Not the same, but it shows that neither locked dependencies nor build-system requirements are available. Locked dependencies are not available because an isolated environment is used instead of the project's environment. #7975 looks like a sensible fix. It will make build-system requirements available. It might still be surprising that locked dependencies are not available when building projects with build scripts but that's really something were consensus is needed (and that's not what this issue actually was about in the first place). |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option).pyproject.toml
Issue
Running
poetry build
with the abovepyproject.toml
does the right thing:Running
poetry install
fails because it attempts to build the project without installingbuild-system.requires
packages.I would have expected the install command to create an isolated environment, install the build requirements and perform the build in that isolated environment, and then install the produced artifact in my current environment.
The text was updated successfully, but these errors were encountered: