-
Notifications
You must be signed in to change notification settings - Fork 31
feat: add extras, no-directory, no-root options #78
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
base: main
Are you sure you want to change the base?
feat: add extras, no-directory, no-root options #78
Conversation
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.
| if self.option("all-extras"): | ||
| extras.update(self.poetry.package.extras) | ||
| for extra in self.option("extras", []): | ||
| extras.update(extra.split()) |
There was a problem hiding this comment.
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?
radoering
left a comment
There was a problem hiding this 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.
|
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. |
|
I created a feature request for this #153 to support the change. |
|
This has to become important enough for someone to address the review comments. |
|
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). |
Add the following options from Poetry installer command:
--no-root--no-directory-E, --extras=EXTRAS--all-extrasThese 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.