-
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 fails when directories for dependencies outside of specified dependency group do not exist #6515
Comments
please read the docs eg per https://python-poetry.org/docs/managing-dependencies#dependency-groups
|
Thanks for your quick response! That's unfortunate for the use case I had in mind. What would the motivation be for always resolving all dependencies? Are there any other patterns that one could follow with poetry to achieve the above? I can think of a few hacky ones but if there is a nice way of doing it I'd much prefer that of course! |
I could imagine a feature that behaved as you suggest: it's just not a feature that poetry actually has. Do whatever hacky thing you have in mind! |
Poetry will always create a lock file for all platforms/install scenarios. It is possible to Regardless, I'm going to close this as I think we already have a feature request I can't find -- if you can't turn it up either feel free to open one. |
Thanks for your prompt responses! I'll try to find a decent workaround to achieve my goals. |
Duplicates #668 as well |
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. |
I am on the latest Poetry version.
I have searched the issues of this repo and believe that this is not a duplicate.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).OS version and name: MacOS 12.5.1
Poetry version: 1.2.0
Issue
I want to use dependency groups to group my dependencies into local (libraries located in the same file system as the project using them) and remote (eg. packages found on PyPI).
The main reason for doing this would be to allow me to install external packages early during docker builds and then, at a later stage copy in the local dependencies and install those. This would avoid having to re-install every external package when local packages are updated since the the docker image layer with the external packages could be reused between builds.
This does not work the way I was hoping though. Given the minimal
pyproject.toml
below:I get the following behaviour:
It is true that the directory does not exist (at this stage), but I would not have expected poetry to care about it since
bar
is not part of the dependency group that was to be installed. Is there a good reason for this?The text was updated successfully, but these errors were encountered: