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
I am on the latest stable Poetry version, installed using a recommended method.
I have searched the issues of this repo and believe that this is not a duplicate.
I have consulted the FAQ and blog for any relevant entries or release notes.
If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.
Issue
First and foremost, thanks for the great tool!
I found an edge case with multiple private package sources hosted on git. When my poetry project (package A) requires another poetry project (package B), and that project in turn has a Git dependency (package C) with a subdirectory, the subdirectory information is lost during writing the lock file, resulting errors like below for subsequent installs or adds:
Unable to determine package info for path: REDACTED
Command ['/tmp/tmpmsqyswsj/.venv/bin/python', '-'] errored with the following return code 1, and output:
Traceback (most recent call last):
File "<stdin>", line 9, in <module>
File "/tmp/tmpmsqyswsj/.venv/lib/python3.11/site-packages/build/__init__.py", line 208, in __init__
_validate_source_directory(srcdir)
File "/tmp/tmpmsqyswsj/.venv/lib/python3.11/site-packages/build/__init__.py", line 109, in _validate_source_directory
raise BuildException(f'Source {srcdir} does not appear to be a Python project: no pyproject.toml or setup.py')
build.BuildException: Source REDACTED does not appear to be a Python project: no pyproject.toml or setup.py
input was : import build
import build.env
import pep517
source = 'REDACTED'
dest = '/tmp/tmpmsqyswsj/dist'
with build.env.IsolatedEnvBuilder() as env:
builder = build.ProjectBuilder(
srcdir=source,
scripts_dir=env.scripts_dir,
python_executable=env.executable,
runner=pep517.quiet_subprocess_runner,
)
env.install(builder.build_system_requires)
env.install(builder.get_requires_for_build('wheel'))
builder.metadata_path(dest)
No fallback setup.py file was found to generate egg_info.
The above error indicates that Poetry is trying to install at the root directory of package C, whereas it is inside a subdirectory instead. poetry.lock looks like this:
[package.dependencies]
REDACTED = {git = "REDACTED", tag = "REDACTED"}
The subdirectory is gone, whereas package B's pyproject.toml states:
[tool.poetry.dependencies]
REDACTED = {git = "REDACTED", subdirectory="REDACTED", tag = "REDACTED"}
This is because poetry.packages.locker.Locker._dump_package()'s VCSDependency case lacks the handling of the subdirectory.
The text was updated successfully, but these errors were encountered:
-vvv
option) and have included the output below.Issue
First and foremost, thanks for the great tool!
I found an edge case with multiple private package sources hosted on git. When my poetry project (package A) requires another poetry project (package B), and that project in turn has a Git dependency (package C) with a subdirectory, the subdirectory information is lost during writing the lock file, resulting errors like below for subsequent installs or adds:
The above error indicates that Poetry is trying to install at the root directory of package C, whereas it is inside a subdirectory instead.
poetry.lock
looks like this:The subdirectory is gone, whereas package B's
pyproject.toml
states:This is because
poetry.packages.locker.Locker._dump_package()
'sVCSDependency
case lacks the handling of the subdirectory.The text was updated successfully, but these errors were encountered: