-
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 add of a GitHub repo with subdirectory fails #5521
Comments
I think this is the cause of the problem: in poetry/src/poetry/console/commands/init.py Lines 444 to 446 in 4d0b710
get_package_from_vcs .
This is the stack trace after running
|
Fixes python-poetry#5521. With this commit, one can finally add a Git dependency with a subdirectory, e.g. ``` talon-core = {git = "https://github.com/zulip/talon.git", rev = "1711705c952806d4a704c7dbf58f21db8e11756a", subdirectory = "talon-core" } ```
Fixes python-poetry#5521. With this commit, one can finally add a Git dependency with a subdirectory, e.g. ``` talon-core = {git = "https://github.com/zulip/talon.git", rev = "1711705c952806d4a704c7dbf58f21db8e11756a", subdirectory = "talon-core" } ```
duplicate #755 |
I opened this issue because #755 was closed at the time. |
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: NixOS unstable
Poetry version: latest master as of 6721ebe
Issue
I am aware that the Git subdirectory feature was merged in #192. I have also read #755. My goal is to install this repo.
This is the syntax that works in requirements.txt (but I want to convert it to Poetry):
I have tried adding this to my pyproject.toml:
then ran
poetry lock --no-update
but this fails withThis is because it looks like the subdirectory is not passed to
build.ProjectBuilder
. I checked the content of /tmp/pypoetry-git-talonlh1f69va, and it actually the root of the repo, not the subdirectory (the one that actually has setup.py).Then, I tried
poetry add -v 'git+https://github.com/zulip/talon.git#1711705c952806d4a704c7dbf58f21db8e11756a&subdirectory=talon-core'
. I got an identical error message.The text was updated successfully, but these errors were encountered: