-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Add support for extra requirements #132
Conversation
fa63882
to
1b26c54
Compare
Hi, First of all, sorry about the delay in looking at the PR. I didn't understand the need for I think without the
This is quite similar to your implementation but there's no I haven't tried this actually but the way I see it is as follows - Currently pipdeptree cannot identify extra requirements For eg. if |
Hi, |
I don't understand why you differentiate: |
yes, but won't the
Am I missing anything?
There's no difference actually. But with |
Now I understand the confusion: your solution would only retain the extra dependencies that are installed on the system/virtualenv. The way I did it, all extra deps are mapped (even if not installed). I thought it'd be nice to see what is installed with which option, as prospecting if you wish. Do you think it's a bad idea? The reason why I wrote an As for the explicit call |
IMO, it's outside the scope of pipdeptree which is basically limited to only packages that are installed on the system/virtualenv. Not sure about the use case, but it could be a separate tool that provides this functionality.
Got it
Makes sense. Also, can you please also provide the |
Alright, I'll leave the external packages out. Here's the pip freeze:
(pipdeptree, I installed with [Edited] I also installed |
b326abc
to
cc114c5
Compare
I'm sorry but I can't seem to find where |
It was introduced in a recently merged PR #128. I think you rebased your branch with latest master? |
cc114c5
to
e190735
Compare
Ah yes, thanks. I didn't know github performed auto rebase on the pull request. |
e190735
to
e626c72
Compare
Alright, ready to merge on my side. Let me know if I can still do anything |
@@ -267,10 +306,12 @@ class PackageDAG(Mapping): | |||
|
|||
@classmethod | |||
def from_pkgs(cls, pkgs): | |||
pkgs = [DistPackage(p) for p in pkgs] | |||
pkgs = [DistPackage(p) for p in pkgs if p.key != 'pkg-resources'] |
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.
Why is 'pkg-resources' omitted? In case it's necessary to be omitted, it'd be good to have a comment explaining why. Just let me know the reason in that case, I'll add add the comment after merging the PR
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.
I guess it could be left in. I forgot that I added that. The only reason I did it was that it's not even on pypi.org, I think it's being installed as part of pip. It's always alone and without dependencies and shows a version of 0.0.0 which is weird.
But I don't mind deleting that if clause if you deem it a better option.
Hi, Thanks for your work on this long pending feature/bug. I wanted to suggest some refactoring but was finding it difficult to communicate exactly. So, I've cherry-picked your commits on another branch and added some more changes on top - #138. Still need to get the tests passing. Closing this PR. It will be merged via PR #138 Thanks |
Alright, perfect. Thank you too for your comments and for finishing the PR. |
Hi
I used your code for a project where the extra requirements were important. So I added support for them.
Let me know what you think.
Best