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

please add status command #131

Closed
vbabiy opened this Issue Mar 15, 2011 · 5 comments

Comments

Projects
None yet
2 participants
@vbabiy
Contributor

vbabiy commented Mar 15, 2011

Please add a status command. It should report such things as

version info

files used by a package

installation paths


@vbabiy

This comment has been minimized.

Show comment
Hide comment
@vbabiy

vbabiy Mar 15, 2011

Contributor
  • Changed content.

Original Comment By: Ian Bicking
Contributor

vbabiy commented Mar 15, 2011

  • Changed content.

Original Comment By: Ian Bicking
@vbabiy

This comment has been minimized.

Show comment
Hide comment
@vbabiy

vbabiy Mar 15, 2011

Contributor
  • Changed content.

Original Comment By: Ian Bicking
Contributor

vbabiy commented Mar 15, 2011

  • Changed content.

Original Comment By: Ian Bicking
@vbabiy

This comment has been minimized.

Show comment
Hide comment
@vbabiy

vbabiy Mar 15, 2011

Contributor

This would be a welcome addition if anyone would like to contribute it, and an
easy place to get started with pip. Most of this information is available
through pkg_resources, with pkg_resources.working_set (which has all the
Distributions), and then attributes of those Distribution objects. One thing
that isn't available there is the installed files, which are tracked via the
installed-files.txt egg-info file that pip creates (but which isn't
standard).


Original Comment By: Ian Bicking
Contributor

vbabiy commented Mar 15, 2011

This would be a welcome addition if anyone would like to contribute it, and an
easy place to get started with pip. Most of this information is available
through pkg_resources, with pkg_resources.working_set (which has all the
Distributions), and then attributes of those Distribution objects. One thing
that isn't available there is the installed files, which are tracked via the
installed-files.txt egg-info file that pip creates (but which isn't
standard).


Original Comment By: Ian Bicking
@vbabiy

This comment has been minimized.

Show comment
Hide comment
@vbabiy

vbabiy Mar 15, 2011

Contributor

I have taken a shot at adding this feature. Working on test cases. Changes
located in my fork:
https://bitbucket.org/khightower/pip/changeset/d0104fd9ab68

How it works:
  • Supports multiple arguments
  • Displays distribution name, version, location, and files
  • Case sensitive ('PyYAML' not 'pyyaml')
  • If the distribution was not installed by pip (missing installed-
    files.txt), then we print the fact.
Examples

Running pip status without any args

# /opt/OpenPython-2.7.1/bin/pip status

ERROR: Missing required argument (status query).

Running pip status with one arg

# /opt/OpenPython-2.7.1/bin/pip status virtualenv

---

Name: virtualenv

Version: 1.5.1

Location: /opt/OpenPython-2.7.1/lib/python2.7/site-packages

Files:

  ../virtualenv.py

  ../virtualenv_support/__init__.py

  ../virtualenv_support/pip-0.8.1.tar.gz

  ../virtualenv_support/distribute-0.6.14.tar.gz

  ../virtualenv.pyc

  ../virtualenv_support/__init__.pyc

  ./

  entry_points.txt

  not-zip-safe

  SOURCES.txt

  dependency_links.txt

  top_level.txt

  PKG-INFO

  ../../../../bin/virtualenv

Running pip status with multiple args

# /opt/OpenPython-2.7.1/bin/pip status virtualenv PyYAML

---

Name: virtualenv

Version: 1.5.1

Location: /opt/OpenPython-2.7.1/lib/python2.7/site-packages

Files:

  ../virtualenv.py

  ../virtualenv_support/__init__.py

  ../virtualenv_support/pip-0.8.1.tar.gz

  ../virtualenv_support/distribute-0.6.14.tar.gz

  ../virtualenv.pyc

  ../virtualenv_support/__init__.pyc

  ./

  entry_points.txt

  not-zip-safe

  SOURCES.txt

  dependency_links.txt

  top_level.txt

  PKG-INFO

  ../../../../bin/virtualenv

---

Name: PyYAML

Version: 3.09

Location: /opt/OpenPython-2.7.1/lib/python2.7/site-packages

Files:

  ../yaml/constructor.py

  ../yaml/serializer.py

  ../yaml/loader.py

  ../yaml/cyaml.py

  ../yaml/events.py

  ../yaml/resolver.py

  ../yaml/dumper.py

  ../yaml/nodes.py

  ../yaml/tokens.py

  ../yaml/composer.py

  ../yaml/scanner.py

  ../yaml/reader.py

  ../yaml/__init__.py

  ../yaml/representer.py

  ../yaml/parser.py

  ../yaml/error.py

  ../yaml/emitter.py

  ../yaml/constructor.pyc

  ../yaml/serializer.pyc

  ../yaml/loader.pyc

  ../yaml/cyaml.pyc

  ../yaml/events.pyc

  ../yaml/resolver.pyc

  ../yaml/dumper.pyc

  ../yaml/nodes.pyc

  ../yaml/tokens.pyc

  ../yaml/composer.pyc

  ../yaml/scanner.pyc

  ../yaml/reader.pyc

  ../yaml/__init__.pyc

  ../yaml/representer.pyc

  ../yaml/parser.pyc

  ../yaml/error.pyc

  ../yaml/emitter.pyc

  ../_yaml.so

  ./

  SOURCES.txt

  dependency_links.txt

  top_level.txt

  PKG-INFO

Running pip status and distribution missing installed-files.txt

# /opt/OpenPython-2.7.1/bin/pip status pip

---

Name: pip

Version: 0.8.2

Location: /opt/OpenPython-2.7.1/lib/python2.7/site-

packages/pip-0.8.2-py2.7.egg

Files:

Cannot locate installed-files.txt

Running pip status and distribution not installed

# /opt/OpenPython-2.7.1/bin/pip status asdf

#

Original Comment By: Kelsey Hightower
Contributor

vbabiy commented Mar 15, 2011

I have taken a shot at adding this feature. Working on test cases. Changes
located in my fork:
https://bitbucket.org/khightower/pip/changeset/d0104fd9ab68

How it works:
  • Supports multiple arguments
  • Displays distribution name, version, location, and files
  • Case sensitive ('PyYAML' not 'pyyaml')
  • If the distribution was not installed by pip (missing installed-
    files.txt), then we print the fact.
Examples

Running pip status without any args

# /opt/OpenPython-2.7.1/bin/pip status

ERROR: Missing required argument (status query).

Running pip status with one arg

# /opt/OpenPython-2.7.1/bin/pip status virtualenv

---

Name: virtualenv

Version: 1.5.1

Location: /opt/OpenPython-2.7.1/lib/python2.7/site-packages

Files:

  ../virtualenv.py

  ../virtualenv_support/__init__.py

  ../virtualenv_support/pip-0.8.1.tar.gz

  ../virtualenv_support/distribute-0.6.14.tar.gz

  ../virtualenv.pyc

  ../virtualenv_support/__init__.pyc

  ./

  entry_points.txt

  not-zip-safe

  SOURCES.txt

  dependency_links.txt

  top_level.txt

  PKG-INFO

  ../../../../bin/virtualenv

Running pip status with multiple args

# /opt/OpenPython-2.7.1/bin/pip status virtualenv PyYAML

---

Name: virtualenv

Version: 1.5.1

Location: /opt/OpenPython-2.7.1/lib/python2.7/site-packages

Files:

  ../virtualenv.py

  ../virtualenv_support/__init__.py

  ../virtualenv_support/pip-0.8.1.tar.gz

  ../virtualenv_support/distribute-0.6.14.tar.gz

  ../virtualenv.pyc

  ../virtualenv_support/__init__.pyc

  ./

  entry_points.txt

  not-zip-safe

  SOURCES.txt

  dependency_links.txt

  top_level.txt

  PKG-INFO

  ../../../../bin/virtualenv

---

Name: PyYAML

Version: 3.09

Location: /opt/OpenPython-2.7.1/lib/python2.7/site-packages

Files:

  ../yaml/constructor.py

  ../yaml/serializer.py

  ../yaml/loader.py

  ../yaml/cyaml.py

  ../yaml/events.py

  ../yaml/resolver.py

  ../yaml/dumper.py

  ../yaml/nodes.py

  ../yaml/tokens.py

  ../yaml/composer.py

  ../yaml/scanner.py

  ../yaml/reader.py

  ../yaml/__init__.py

  ../yaml/representer.py

  ../yaml/parser.py

  ../yaml/error.py

  ../yaml/emitter.py

  ../yaml/constructor.pyc

  ../yaml/serializer.pyc

  ../yaml/loader.pyc

  ../yaml/cyaml.pyc

  ../yaml/events.pyc

  ../yaml/resolver.pyc

  ../yaml/dumper.pyc

  ../yaml/nodes.pyc

  ../yaml/tokens.pyc

  ../yaml/composer.pyc

  ../yaml/scanner.pyc

  ../yaml/reader.pyc

  ../yaml/__init__.pyc

  ../yaml/representer.pyc

  ../yaml/parser.pyc

  ../yaml/error.pyc

  ../yaml/emitter.pyc

  ../_yaml.so

  ./

  SOURCES.txt

  dependency_links.txt

  top_level.txt

  PKG-INFO

Running pip status and distribution missing installed-files.txt

# /opt/OpenPython-2.7.1/bin/pip status pip

---

Name: pip

Version: 0.8.2

Location: /opt/OpenPython-2.7.1/lib/python2.7/site-

packages/pip-0.8.2-py2.7.egg

Files:

Cannot locate installed-files.txt

Running pip status and distribution not installed

# /opt/OpenPython-2.7.1/bin/pip status asdf

#

Original Comment By: Kelsey Hightower
@carljm

This comment has been minimized.

Show comment
Hide comment
@carljm

carljm Sep 8, 2012

Contributor

Fixed with merge of #664.

Contributor

carljm commented Sep 8, 2012

Fixed with merge of #664.

@carljm carljm closed this Sep 8, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment