Skip to content

poetry.script extras seems to be ignored, and scripts are always installed #6892

@willmcgugan

Description

@willmcgugan
  • Poetry version: 1.2.2
  • Python version: 3.10.4
  • OS version and name: macOS 12.5.1
  • pyproject.toml:
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

I'm trying to install a CLI script only if a given extra is supplied. Here's the config:

[tool.poetry.scripts]
textual = { callable = "textual.cli.cli:run", extras = ["dev"] }

My understand is that textual will be installed on the path only if the "dev" extras has been requested.

After running poetry install there is a textual on the path, which is broken because of missing dependancies. I would expect that poetry would only install textual with poetry install --extras dev.

Metadata

Metadata

Assignees

Labels

area/coreRelated to the poetry-core librarykind/bugSomething isn't working as expectedstatus/triageThis issue needs to be triaged

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions