Skip to content

export command should support multiple "extras" in single flag, similar to install command #31

@johnmacnamararseg

Description

@johnmacnamararseg
  • I am on the latest Poetry version.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • OS version and name: macOS Catalina (10.15.3) (Issue is not OS dependent)
  • Poetry version: 1.1.3

Issue

This works for defining extras with install command

poetry install --extras "mysql pgsql"
poetry install -E mysql -E pgsql

however, -E/--extras option of export command does not support defining multiple extras with a single flag. For instance,

pyproject.toml

.
.
.
mysql = { version = "^0.0.1", optional = true }
pgsql = { version = "^1.2", optional = true }

[tool.poetry.extras]
mysql  = ["mysql"]
pgsql = ["pgsql"]
poetry export -E mysql -E pgsql
or 
poetry export --extras mysql --extras pgsql

will work, but

poetry export --extras "mysql pgsql"

is not supported and neither extra will be included in the export.

Issue is pretty minor, but difference in behavior causes some confusion.

I am opening a PR to add the ability to define multiple extras in a single flag in the export command

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions