You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Poetry install fails when using a github dependency with subdirectory AND in-project virtual environments.
I have confirmed that this issue happens on Poetry 1.6, 1.7 and 1.8.5.
This happens regardless of Github Repository Visibility (can be private or public).
Steps to reproduce:
Creating Package A in a Github Repo Subdirectory.
Create a Github repository monorepo, and clone it.
Navigate to your local monorepo-a directory.
Create a folder in the root directory called package-a, the cd into it.
Ensure any in-project virtual environments are deleted (they should look like package-b-...-py3.12).
Delete the poetry.toml file.
Run poetry install, this will succeed.
Restore the poetry.toml file.
Run poetry install again, and notice that it now succeeds with an in-project virtual environment now exists.
It seems that something in the poetry cache enables it to succeed after it has previously succeeded with the out of project directory virtual environment.
Poetry Installation Method
pip
Operating System
Microsoft Windows 11 Home Version [10.0.22621 Build 22621]
mattcoulter7
changed the title
Poetry install fails when github dependency subdirectory + virtualenvs.path = "."
Poetry install fails when using a github dependency with subdirectory AND in-project virtual environments.
Dec 19, 2024
Description
Poetry install fails when using a github dependency with subdirectory AND in-project virtual environments.
I have confirmed that this issue happens on Poetry 1.6, 1.7 and 1.8.5.
This happens regardless of Github Repository Visibility (can be private or public).
Steps to reproduce:
Creating Package A in a Github Repo Subdirectory.
monorepo
, and clone it.monorepo-a
directory.package-a
, the cd into it.pyproject.toml
with the following contents0.1.0
.Creating Package B which depends on Package A via git subdirectory.
package-b
, the cd into it.pyproject.toml
with the following contents:poetry.toml
with the following contents:poetry install
inside ofpackage-b
FileNotFoundError
due to an incorrect directory. Error Log:Workarounds
The issue can be bypassed through the following:
package-b
.in-project
virtual environments are deleted (they should look likepackage-b-...-py3.12
).poetry.toml
file.poetry install
, this will succeed.poetry.toml
file.poetry install
again, and notice that it now succeeds with anin-project
virtual environment now exists.It seems that something in the poetry cache enables it to succeed after it has previously succeeded with the out of project directory virtual environment.
Poetry Installation Method
pip
Operating System
Microsoft Windows 11 Home Version [10.0.22621 Build 22621]
Poetry Version
Poetry (version 1.8.5)
Poetry Configuration
Python Sysconfig
Example pyproject.toml
See above steps to reproduce
Poetry Runtime Logs
The text was updated successfully, but these errors were encountered: