Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add extras, no-directory, no-root options #78

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

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.

2 participants