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

Bug in usage of pip.FrozenRequirement.from_dist() ? #319

Closed
jedie opened this issue Jul 13, 2011 · 1 comment
Closed

Bug in usage of pip.FrozenRequirement.from_dist() ? #319

jedie opened this issue Jul 13, 2011 · 1 comment
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@jedie
Copy link

jedie commented Jul 13, 2011

I would like to build a list if installed packages in a virtualenv and would like to differentiate between editables and normal packages...

But this script identify all editables as normal packages:

import pip
from pip.util import get_installed_distributions

for dist in get_installed_distributions(local_only=True):
    req = pip.FrozenRequirement.from_dist(dist, dependency_links=[], find_tags=False)
    if req.editable:
        print "editable: %s" % req
    else:
        print "normal package: %s" % req

I call this script in a activated environment used pip v1.0.1

@svisser
Copy link
Contributor

svisser commented Dec 17, 2014

This issue can be closed, this now works correctly in 6.0.dev1 (with a minor update to the above code that get_installed_distributions is now in pip.utils, not pip.util).

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 4, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 4, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

3 participants