use python-deps to handle missing dependencies.

Apply it to gst python module.
This commit is contained in:
Thomas Vander Stichele
2013-01-27 22:24:22 +01:00
parent 434a7ca131
commit 6ac8408f0d
5 changed files with 51 additions and 6 deletions

View File

@@ -9,6 +9,7 @@ morituri_PYTHON = \
cache.py \
common.py \
config.py \
deps.py \
directory.py \
drive.py \
encode.py \

34
morituri/common/deps.py Normal file
View File

@@ -0,0 +1,34 @@
# -*- Mode: Python -*-
# vi:si:et:sw=4:sts=4:ts=4
import os
import urllib
from morituri.extern.deps import deps
class DepsHandler(deps.DepsHandler):
def __init__(self, name='morituri'):
deps.DepsHandler.__init__(self, name)
self.add(GStPython())
def report(self, summary):
reporter = os.environ.get('EMAIL_ADDRESS', None)
get = "summary=%s" % urllib.quote(summary)
if reporter:
get += "&reporter=%s" % urllib.quote(reporter)
return 'http://thomas.apestaart.org/morituri/trac/newticket?' + get
class GStPython(deps.Dependency):
module = 'gst'
name = "GStreamer Python bindings"
homepage = "http://gstreamer.freedesktop.org"
def Fedora_install(self, distro):
return self.Fedora_yum('gstreamer-python')
#def Ubuntu_install(self, distro):
# pass