Skip to content

Conversation

@jvtm
Copy link

@jvtm jvtm commented Sep 24, 2023

Add the following options from Poetry installer command:

  • --no-root
  • --no-directory
  • -E, --extras=EXTRAS
  • --all-extras

These are useful for creating different combinations of archives and Docker layers.

Extras logic is a simplified variant of the full install command, but works for all practical cases. Maybe Poetry could share them as easily as the group options.

Add the following options from Poetry installer command:
 * `--no-root`
 * `--no-directory`
 * `-E, --extras=EXTRAS`
 * `--all-extras`

These are useful for creating different combinations of archives and
Docker layers.

Extras logic is a simplified variant of the full install command,
but works for all practical cases. Maybe Poetry could share them as
easily as the group options.
Comment on lines +54 to +57
if self.option("all-extras"):
extras.update(self.poetry.package.extras)
for extra in self.option("extras", []):
extras.update(extra.split())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

poetry install does not accept both flags at the same time. Maybe, we should print the same error for consistency?

Copy link
Member

@radoering radoering left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add at least some basic tests.

@PeterBosch2
Copy link

just came across the missing "no-root" flag thing when setting up a container build. This would reduce the turn-arround times when dependencies can go to a separate Docker layer.

@PeterBosch2
Copy link

I created a feature request for this #153 to support the change.

@radoering
Copy link
Member

This has to become important enough for someone to address the review comments.

@jvtm
Copy link
Author

jvtm commented Sep 23, 2025

FYI all, I have no interest in porting this to Poetry 2.x series. The revision seen here is still being used in some private projects that are using Poetry 1.8 (soon to receive bigger refactoring / using other approaches).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants