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 --list-deps debug helper #74

Closed
adamcik opened this Issue Mar 9, 2011 · 1 comment

Comments

2 participants
@adamcik
Member

adamcik commented Mar 9, 2011

Proposed debug command that tries to retrieve version and locations of deps in order aid provide info about what mopidy is using.

@jodal

This comment has been minimized.

Member

jodal commented Mar 4, 2012

Location of deps can be found by using dependency_module_a.__file__.

Version can be extracted from most dependencies:

  • pyspotify have had a pyspotify.__version__ version string since 1.3.
  • pyspotify exposes the major version of libspotify as pyspotify.api_version.
  • pykka will have a pykka.__version__ version string from the next release. Up to and including 0.13 pykka.get_version() returned a version string.
  • GStreamer got the functions gst.get_gst_version() and gst.get_pygst_version() which returns version tuples.
  • pylast have a pylast.__version__ string with major and minor number, but not including the patch version.
  • dbus have a version tuple at dbus.version
  • serial have a version string at serial.VERSION

In addition, in many cases we may use pkg_resources (a part of Distribute) to get the version about installed Python packages:

>>> import pkg_resources
>>> pkg_resources.get_distribution('mopidy')
Mopidy 0.5.0-106-gd5913b3 (/usr/local/lib/python2.7/dist-packages)
>>> pkg_resources.get_distribution('pykka')
Pykka 0.13.0 (/usr/lib/pymodules/python2.7)
>>> pkg_resources.get_distribution('pyspotify')
pyspotify 1.6.1 (/usr/lib/pymodules/python2.7)
>>> pkg_resources.get_distribution('pylast')
pylast 0.5.11 (/usr/lib/pymodules/python2.7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment