-
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
Path dependency files not installed when listed in .gitignore
#6624
Comments
I suspect this is an artifact of our We honestly could go either way on this -- it could just be a docs fix to codify this behavior. Could you please explain why it might be desirable to install Python code from a path you have explicitly excluded from your repo? Typically relative parent paths are used, and they're generally preferable for this as it makes it clear they're not under the aegis of source control/missing files from a local clone. |
Thanks for the prompt response. This is actually a pretty strange use case. NVIDIA's Previously we were installing via the We can keep the -E option specifically for this dependency, but not sure if this is the desired behavior for groups, too. |
.gitignore
.gitignore
Your attempt to include looks wrong, I think you want something like diff --git a/test/inner_project/pyproject.toml b/test/inner_project/pyproject.toml
index 2c6411b..c586da4 100644
--- a/test/inner_project/pyproject.toml
+++ b/test/inner_project/pyproject.toml
@@ -4,10 +4,10 @@ version = "0.1.0"
description = ""
authors = ["Costa Huang <costa.huang@outlook.com>"]
readme = "README.md"
-packages = [{include = "inner_project"}]
+include = ["inner_project/*"] |
Also the path dependency and nested project structure is unnecessary complication for the repro, you can just |
I was going to suggest that all there is to do here is maybe improve the docs, but actually https://python-poetry.org/docs/pyproject#include-and-exclude looks pretty reasonable - not sure how you decided to do something quite different? If you think the docs can be improved then MR welcome, I don't think there's a bug though. |
Ah, now I understand the interaction. The inner Poetry instance is recursing up and finding itself in the |
Thank you! I tried that |
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) and have included the output below.Issue
When installing a sub-project via relative path, the sub-project is not importable when the its path is in the
.gitignore
. See a demo below and a minimal reproduction here.The text was updated successfully, but these errors were encountered: