-
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
Install dependencies from a local directory containing archives #558
Comments
I have exactly the same issue 😲 |
This would be great. It would solve a different use case for us (finding internal dependencies in a mono-repo project). |
A thought: “poetry install” does more than installing from wheels. I am thinking that some flag or even different subcommand could be called for, when you want to tell Poetry, “just install using these wheels, and don’t do any resolution or checking unless something is missing” |
Also Poetry uses pip under the hood, which means it seems to respect pip env vars. PIP_FIND_LINKS and PIP_WHEEL_DIR may work with poetry install already. I need to confirm... |
I tried running And got:
With the following
am I missing something @hangtwenty ? :( |
Gotcha. Thanks for checking that, I guess that doesn't do it after all. It may make sense for Poetry to just support arbitrary args/config to You could do This is the approach I've been using recently, and I'm caching the 'wheelhouse' (and virtualenv) between stages on a multistage docker build. It's working pretty well - I'd like to put together a generic version in a library or at least a gist |
Very interesting. I'll try with |
I'll add a note here from #76 — this works —
can be useful as far as ad-hoc or known wheels (in a commercial setting, maybe it's internal shared code etc) but doesn't address the overall "wheelhouse" pattern |
Also, I just wrote some thoughts about interface changes or workflows, that could work well with both wheelhouse-related, and cases like handling subdependency conflicts ... over here, #697 (comment) Might be too peculiar of ideas for them to wind up included in Poetry itself, so I'm still considering writing an accompanying utility or wrapper |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing this issue automatically because it has not had any activity since it has been marked as stale. If you think it is still relevant and should be addressed, feel free to open a new one. |
This is still a relevant issue - It would be nice to have that feature. On big projects, when there are a lot of local packages installing via path and relative paths is disaster. Example: let's say that package b has dependency on package a, the following pyproject need to be given:
This is just getting awful when discussing on much bigger projects. more niter behavior would be:
and a link to the local package would be given as same as given by the pip --find-links "<PACKAGE_A_PATH>" |
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. |
Issue
Like "pip", poetry should allow applications to install dependencies from a local directory containing archives. This would enable developers to compile Python wheels in the first stage of a Docker multi-stage build then depend on only the compiled archives in another stage. If you're interested, please see my blog post outlining the reasons for this workflow.
The following configuration option could work but it's just a starting suggestion:
In the above example, projects could defer to the main package index if no correctly-formatted wheels / archives are found in an instance folder (in this case, relative to pyproject.toml).
See below for a sample Dockerfile (using pip for now, hopefully poetry in the future):
Thanks again for all the work on this tool; Poetry looks like an amazing project and I look forward to being able to use it as a daily driver.
The text was updated successfully, but these errors were encountered: