Nested relative directory dependency failing to resolve.
See original GitHub issue- 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: 10.15.7 macOS Catalina
- Poetry version: 1.1.1
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/goofiva/6fd84a171d7ac1587f7f1465a933baec
Issue
I’m having trouble installing complex (but not circular) nested relative dependencies.
This was working in poetry v1.0.5.
Please see this public repo for replicating this error.
https://github.com/goofiva/poetry-directory-dependency
➜ package-a git:(main) ✗ poetry install -vvv
Creating virtualenv package-a-iE34YiwS-py3.9 in /Users/va/Library/Caches/pypoetry/virtualenvs
Using virtualenv: /Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9
Installing dependencies from lock file
Finding the necessary packages for the current system
Package operations: 3 installs, 0 updates, 0 removals
• Installing package-c (0.1.0 /Users/va/wp/poetry_dependency_bug/package-c): Pending...
• Installing package-c (0.1.0 /Users/va/wp/poetry_dependency_bug/package-c): Building...
• Installing package-c (0.1.0 /Users/va/wp/poetry_dependency_bug/package-c)
• Installing package-b (0.1.0 /Users/va/wp/poetry_dependency_bug/package-b): Pending...
• Installing package-b (0.1.0 /Users/va/wp/poetry_dependency_bug/package-b): Building...
• Installing package-b (0.1.0 /Users/va/wp/poetry_dependency_bug/package-b): Failed
EnvCommandError
Command ['/Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/bin/pip', 'install', '--no-deps', '-U', '/Users/va/wp/poetry_dependency_bug/package-b'] errored with the following return code 1, and output:
Processing /Users/va/wp/poetry_dependency_bug/package-b
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/bin/python /Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/tmpea5bsf0z
cwd: /private/var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/pip-req-build-2mbl5clu
Complete output (16 lines):
Traceback (most recent call last):
File "/Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/private/var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/pip-build-env-9cya5uui/overlay/lib/python3.9/site-packages/poetry/core/masonry/api.py", line 34, in prepare_metadata_for_build_wheel
poetry = Factory().create_poetry(Path(".").resolve())
File "/private/var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/pip-build-env-9cya5uui/overlay/lib/python3.9/site-packages/poetry/core/factory.py", line 91, in create_poetry
self.create_dependency(name, constraint, root_dir=package.root_dir)
File "/private/var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/pip-build-env-9cya5uui/overlay/lib/python3.9/site-packages/poetry/core/factory.py", line 242, in create_dependency
dependency = DirectoryDependency(
File "/private/var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/pip-build-env-9cya5uui/overlay/lib/python3.9/site-packages/poetry/core/packages/directory_dependency.py", line 36, in __init__
raise ValueError("Directory {} does not exist".format(self._path))
ValueError: Directory ../package-c does not exist
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/bin/python /Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/kz/_9xwzxsn5l5gb96yc414fm3r0000gn/T/tmpea5bsf0z Check the logs for full command output.
WARNING: You are using pip version 20.2.2; however, version 20.2.3 is available.
You should consider upgrading via the '/Users/va/Library/Caches/pypoetry/virtualenvs/package-a-iE34YiwS-py3.9/bin/python -m pip install --upgrade pip' command.
at ~/.poetry/lib/poetry/utils/env.py:948 in _run
944│ output = subprocess.check_output(
945│ cmd, stderr=subprocess.STDOUT, **kwargs
946│ )
947│ except CalledProcessError as e:
→ 948│ raise EnvCommandError(e, input=input_)
949│
950│ return decode(output)
951│
952│ def execute(self, bin, *args, **kwargs):
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (1 by maintainers)
Top Results From Across the Web
Maven cannot resolve dependency for module in same multi ...
Maven is unable to resolve a dependency of one of my modules on another. [ERROR] Failed to execute goal on project parser-app: Could...
Read more >Dependency resolution - Parcel
As Parcel builds your source code, it discovers dependencies, which allow code to be broken into separate files and reused in multiple places....
Read more >The Executable Jar Format - Spring
To solve this problem, many developers use “shaded” jars. A shaded jar packages all ... Dependencies should be placed in a nested BOOT-INF/lib...
Read more >Frequently Asked Questions - PNPM
The easiest solution to resolve missing dependencies of the buggy packages is to add iterall as a dependency to our project's package.json ....
Read more >Configure relative paths
If any reachable policy fails, the chain fails, and no more policies are ... The order of resolution for nested relative paths is...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@abn, Thanks a BUNCH! ❤️
@goofiva
1.1.2
is now out with this fix.