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
So basically a minimal setup with a main project and a helper library, with the main project having a path dependency on the helper library.
Doing poetry install -vvv in main_project/ shows poetry-core 2.0.1 being installed and used:
[...]
Creating new session for pypi.org
Source (PyPI): 26 packages found for poetry-core >=1.0.0
Source (PyPI): 1 packages found for poetry-core >=1.0.0
[build:build] Getting build dependencies for editable...
Source (PyPI): 26 packages found for poetry-core >=1.0.0
Source (PyPI): 1 packages found for poetry-core >=1.0.0
[build:build] Building editable...
- Installing helper-library (1.0.0 C:/projects/poetry_path_dep_repro/helper_library): Installing...
- Installing helper-library (1.0.0 C:/projects/poetry_path_dep_repro/helper_library)
[...]
This is a little bit silly because I'm running poetry. I already have poetry-core. It gets worse than silly and slower than necessary if the helper library has a >= constraint on poetry-core under [build-system] and your project's version of Python stops being supported by a new release of poetry-core. In that case, you can have a poetry install that ran perfectly fine suddenly stop working one day. Putting an upper bound on the poetry-core version fixes this, but 1) That's not what Poetry's pyproject.toml documentation uses, so this will surely catch people by surprise 2) It's still not ideal to be downloading an extra poetry-core at install time.
All I want is to use local helper libraries that have their dependencies declared in a Poetry-compatible pyproject.toml, nothing fancy. Am I missing something or is there no way to avoid downloading the [build-system] requirements at install time when using path dependencies, even if the requirement is just poetry-core with a version constraint compatible with the currently running poetry?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Suppose you have the following directory structure:
So basically a minimal setup with a main project and a helper library, with the main project having a path dependency on the helper library.
Doing
poetry install -vvv
in main_project/ shows poetry-core 2.0.1 being installed and used:This is a little bit silly because I'm running poetry. I already have poetry-core. It gets worse than silly and slower than necessary if the helper library has a >= constraint on poetry-core under [build-system] and your project's version of Python stops being supported by a new release of poetry-core. In that case, you can have a
poetry install
that ran perfectly fine suddenly stop working one day. Putting an upper bound on the poetry-core version fixes this, but 1) That's not what Poetry's pyproject.toml documentation uses, so this will surely catch people by surprise 2) It's still not ideal to be downloading an extra poetry-core at install time.All I want is to use local helper libraries that have their dependencies declared in a Poetry-compatible pyproject.toml, nothing fancy. Am I missing something or is there no way to avoid downloading the [build-system] requirements at install time when using path dependencies, even if the requirement is just poetry-core with a version constraint compatible with the currently running poetry?
Beta Was this translation helpful? Give feedback.
All reactions