-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Include markers issue #5092 #5114
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8a0207e
Include markers
ImreC 4861665
Change to marker flag and include test
ImreC ea705d3
Update docs
ImreC 1b074ea
Merge branch 'pypa:main' into fix-missing-markers
ImreC 3117501
Merge branch 'main' into fix-missing-markers
ImreC 91fef69
Flip markers flag to exclude by default
ImreC bef16f8
Docs and newsfile
ImreC de8c28e
Docs formatiing
ImreC c8b2a34
Let default dependencies update dev dependencies
ImreC File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Adjust ``pipenv requirements`` to add markers and add an ``--exclude-markers`` option to allow the exclusion of markers |
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 |
---|---|---|
|
@@ -763,8 +763,9 @@ def verify(state): | |
"--dev-only", is_flag=True, default=False, help="Only add development requirements." | ||
) | ||
@option("--hash", is_flag=True, default=False, help="Add package hashes.") | ||
@option("--exclude-markers", is_flag=True, default=False, help="Exclude markers.") | ||
@pass_state | ||
def requirements(state, dev=False, dev_only=False, hash=False): | ||
def requirements(state, dev=False, dev_only=False, hash=False, exclude_markers=False): | ||
|
||
from pipenv.utils.dependencies import convert_deps_to_pip | ||
|
||
|
@@ -776,18 +777,18 @@ def requirements(state, dev=False, dev_only=False, hash=False): | |
|
||
deps = {} | ||
|
||
if not dev_only: | ||
deps.update(lockfile["default"]) | ||
if dev or dev_only: | ||
deps.update(lockfile["develop"]) | ||
if not dev_only: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for flipping the ordering here! |
||
deps.update(lockfile["default"]) | ||
|
||
pip_deps = convert_deps_to_pip( | ||
deps, | ||
project=None, | ||
r=False, | ||
include_index=False, | ||
include_hashes=hash, | ||
include_markers=False, | ||
include_markers=not exclude_markers, | ||
) | ||
|
||
for d in pip_deps: | ||
|
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
typo need space
flag will
-- I tried to edit this but I don't think I can directly without some hoop jumping.