-
Notifications
You must be signed in to change notification settings - Fork 2.4k
poetry run pip install . doesn't work with directory dependencies #3818
Copy link
Copy link
Closed
python-poetry/poetry-core
#141Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected
Description
- 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 (-vvvoption).
No verbose output because -v is currently broken: #3751
- OS version and name: Ubuntu 20.04
- Poetry version: 1.1.5
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/AndrewGuenther/4fc4bb77bad367655bcdd148587fac8e
Issue
When I try to run poetry run pip install . for my poetry package, it breaks if I have a directory dependency with the following error:
Processing /home/andrew/worksapce/projects/my-project
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /home/andrew/.cache/pypoetry/virtualenvs/my-project-JuauOX3v-py3.8/bin/python /home/andrew/.cache/pypoetry/virtualenvs/my-project-JuauOX3v-py3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp0h3jkq4v
cwd: /tmp/pip-req-build-5e4zvq59
Complete output (16 lines):
Traceback (most recent call last):
File "/home/andrew/.cache/pypoetry/virtualenvs/my-project-JuauOX3v-py3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/home/andrew/.cache/pypoetry/virtualenvs/my-project-JuauOX3v-py3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/andrew/.cache/pypoetry/virtualenvs/my-project-JuauOX3v-py3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-ta34h747/overlay/lib/python3.8/site-packages/poetry/core/masonry/api.py", line 43, in prepare_metadata_for_build_wheel
poetry = Factory().create_poetry(Path(".").resolve(), with_dev=False)
File "/tmp/pip-build-env-ta34h747/overlay/lib/python3.8/site-packages/poetry/core/factory.py", line 93, in create_poetry
self.create_dependency(name, constraint, root_dir=package.root_dir)
File "/tmp/pip-build-env-ta34h747/overlay/lib/python3.8/site-packages/poetry/core/factory.py", line 244, in create_dependency
dependency = DirectoryDependency(
File "/tmp/pip-build-env-ta34h747/overlay/lib/python3.8/site-packages/poetry/core/packages/directory_dependency.py", line 41, in __init__
raise ValueError("Directory {} does not exist".format(self._path))
ValueError: Directory ../../lib/my-project-lib does not exist
----------------------------------------
WARNING: Discarding file:///home/andrew/worksapce/projects/my-project. Command errored out with exit status 1: /home/andrew/.cache/pypoetry/virtualenvs/my-project-JuauOX3v-py3.8/bin/python /home/andrew/.cache/pypoetry/virtualenvs/my-project-JuauOX3v-py3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp0h3jkq4v Check the logs for full command output.
ERROR: Command errored out with exit status 1: /home/andrew/.cache/pypoetry/virtualenvs/my-project-JuauOX3v-py3.8/bin/python /home/andrew/.cache/pypoetry/virtualenvs/my-project-JuauOX3v-py3.8/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp0h3jkq4v Check the logs for full command output.
../../lib/my-project-lib does exist, and my package can build just fine when running poetry build. Executing poetry run pip install ../../lib/my-project-lib or poetry add ../../lib/my-project-lib also work. Seems like there's some local dependency resolution issues happening specifically when poetry is invoked by pip.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't working as expectedSomething isn't working as expected