poetry
poetry copied to clipboard
Packages included in an Extra
- Poetry version: Poetry (version 1.5.1)
- Python version: Python: 3.10.10
- OS version and name: macOS 13.5
- pyproject.toml:
[tool.poetry.dependencies]
package = {version = "^1.4.49", optional = false}
[tool.poetry.extras]
extra = ["package"]
- [x] I am on the latest stable Poetry version, installed using a recommended method.
- [x] I have searched the issues of this repo and believe that this is not a duplicate.
- [x] I have consulted the FAQ and blog for any relevant entries or release notes.
- [x] If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.
Issue
If I run poetry install
, package
installs as expected.
However,
- If I add this project to another project
poetry add <path_to_project>
, thenpackage
doesn't install. (It should!) - If I publish the project and then do
pip install my_project
, thenpackage
doesn't install. (It should!)- But if I do
pip install my_project[extra]
thenpackage
does install.
- But if I do
Summary:
package = {version = "^1.4.49", optional = false}
Should not have the same result as:
package = {version = "^1.4.49", optional = true}
When it comes to installing a project externally. Just because it's included in one of the extras... especially when it installs as expected within a project.