-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #455 from vergenzt/add-strip-extras
Add --strip-extras feature to wrap pip-compile flag
- Loading branch information
Showing
3 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
""" | ||
Strip extras | ||
============ | ||
Instructs ``pip-compile`` to attempt to omit extras in transient dependencies, | ||
while assuring the constraints compatibility. | ||
.. code-block:: text | ||
--strip-extras Try avoiding use of extras. | ||
""" | ||
from .base import ClickOption | ||
from .forward import ForwardOption | ||
|
||
|
||
class StripExtras(ForwardOption): | ||
"""Attempt to drop extras""" | ||
|
||
OPTION_NAME = 'strip_extras' | ||
CLICK_OPTION = ClickOption( | ||
long_option='--strip-extras', | ||
is_flag=True, | ||
default=False, | ||
help_text='Try avoiding use of extras.' | ||
) | ||
enabled_pin_options = ['--strip-extras'] |