-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Closed
Description
How do I specify relative paths that pip can use in pyproject.toml?
poetry successfully installs them, however pip fails with the following error:
File "/tmp/pip-build-env-ck09aiax/overlay/lib/python3.7/site-packages/poetry/core/packages/directory_dependency.py", line 36, in __init__
raise ValueError("Directory {} does not exist".format(self._path))
ValueError: Directory ../lib_foo does not exist
Example
I have the following repository structure
.
├── lib_foo
│ ├── lib_foo
│ │ └── __init__.py
│ └── pyproject.toml
└── main_app
├── main_app
│ └── __init__.py
└── pyproject.toml
main_app is dependent upon lib_foo, its dependecies looks like this:
./main_app/pyproject.toml
[tool.poetry.dependencies]
python = "^3.7"
lib-foo = { path = "../lib_foo" } # also tried path = "../lib_foo/"when doing:
./main_app$ poetry install # runs successfully
./main_app$ python -m pip install ../lib_foo/ # runs successfully
./main_app$ python -m pip install . # fails with the error mentioned above
./main_app$ python -m pip --version
pip 20.1.1 from ./main_app/my_venv/lib/python3.7/site-packages/pip (python 3.7)
I am using poetry when developing a project however when deploying them I want to only use pip
Metadata
Metadata
Assignees
Labels
No labels