Skip to content
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

Add --only-root option for install command. #2166

Closed
2 tasks done
jancespivo opened this issue Mar 10, 2020 · 6 comments
Closed
2 tasks done

Add --only-root option for install command. #2166

jancespivo opened this issue Mar 10, 2020 · 6 comments
Labels
kind/feature Feature requests/implementations

Comments

@jancespivo
Copy link

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

It would be nice if the --only-root option for install command will be introduced. We have a use-case with the multistage docker build. At first, we install dependencies with --no-root option because dependencies are not changing so often. During the second stage, we would like to install only the application. Unfortunately, there are some git dependencies so the second stage requires git installed even no dependencies are finally installed.

@jancespivo jancespivo added the kind/feature Feature requests/implementations label Mar 10, 2020
@brettdh
Copy link

brettdh commented Aug 24, 2020

Also interested in this feature. I have a similar multistage build, with the added constraint that the second stage has no network connectivity, so as to isolate the parts of the build that depend on external data. We could remove --no-root from the first-stage installation, but this would require moving build steps to the first stage as well, which defeats the purpose of them taking place in a second, isolated environment. Current workaround is to run poetry install during the second stage as well - which works, as long as the venv has not changed between the stages - but it makes me uneasy that I can't explicitly say "only install the root package".

@elliott-imhoff
Copy link

I'd like to add support for this feature. I have repos with C++ extensions I need to edit and rebuild while developing. Right now, the only way for me to do so is rerun poetry install after making changes to the C++ code, which then leads to poetry trying to reinstall all dependencies. Some of these dependencies include git repos that have C extensions of their own for which I need to wait for everything to clone and rebuild. Being able to just rebuild the root package I'm working on would drastically speed up my development cadence.

@hjwp
Copy link

hjwp commented Aug 24, 2022

Curious if anyone has found a manual workaround for this? is there a way to use pip install -e or similar to install the packages specified in tool.poetry.packages in pyproject.tom? maybe by duplicating that info somehow?

[edit]

answering my own question -- pip install --no-deps . seems to do the trick, based on my existing pyproject.toml.

So it seems like there i no need for a special poetry install --only-root really??

@sh-at-cs
Copy link

sh-at-cs commented Sep 7, 2022

This seems to have been implemented recently in #5783.

@radoering
Copy link
Member

Resolved by #5783

Copy link

github-actions bot commented Mar 1, 2024

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants